public float reqWidth() { float reqWidth = 0; if (icon != null){ reqWidth += icon.width() + 2; } if (text != null && !text.text().equals("")){ reqWidth += text.width() + 2; } return reqWidth; }
public float reqWidth() { float reqWidth = 0; if (icon != null){ reqWidth += icon.width() + 2; } if (text != null && !text.text().equals("")){ reqWidth += text.width() + 2; } return reqWidth; }
@Override protected void layout() { super.layout(); icon.x = x + (width - icon.width()) / 2; icon.y = y + (height - icon.height()) / 2; }
public void pickup( Item item, int cell) { pickedUp.reset( item, cell, btnJournal.journalIcon.x + btnJournal.journalIcon.width()/2f, btnJournal.journalIcon.y + btnJournal.journalIcon.height()/2f); }
@Override protected void layout() { super.layout(); icon.x = x + (width - icon.width()) / 2; icon.y = y + (height - icon.height()) / 2; }
public void pickup( Item item, int cell) { pickedUp.reset( item, cell, btnJournal.journalIcon.x + btnJournal.journalIcon.width()/2f, btnJournal.journalIcon.y + btnJournal.journalIcon.height()/2f); }
@Override protected void layout() { super.layout(); bg.x = x + 13; bg.y = y + 2; journalIcon.x = bg.x + (bg.width() - journalIcon.width())/2f; journalIcon.y = bg.y + (bg.height() - journalIcon.height())/2f; PixelScene.align(journalIcon); keyIcon.x = bg.x + 1; keyIcon.y = bg.y + 1; keyIcon.width = bg.width - 2; keyIcon.height = bg.height - 2; PixelScene.align(keyIcon); }
@Override protected void layout() { super.layout(); if (icon != null) { icon.x = x + (width - icon.width()) / 2f; icon.y = y + (height - icon.height()) / 2f; PixelScene.align(icon); } }
@Override protected synchronized void layout() { super.layout(); if (icon != null){ icon.x = x + (width - icon.width()) / 2; icon.y = y + (height - icon.height()) / 2; PixelScene.align(icon); if (!members.contains(icon)) add(icon); } }
@Override protected void layout() { super.layout(); if (hero != null){ hero.x = x + (width - hero.width()) / 2f; hero.y = y + (height - hero.height()) / 2f; PixelScene.align(hero); } }
@Override protected void layout() { super.layout(); if (hero != null){ hero.x = x + (width - hero.width()) / 2f; hero.y = y + (height - hero.height()) / 2f; PixelScene.align(hero); } }
@Override protected void layout() { super.layout(); if (icon != null) { icon.x = x + (width - icon.width()) / 2f; icon.y = y + (height - icon.height()) / 2f; PixelScene.align(icon); } }
@Override protected synchronized void layout() { super.layout(); if (icon != null){ icon.x = x + (width - icon.width()) / 2; icon.y = y + (height - icon.height()) / 2; PixelScene.align(icon); if (!members.contains(icon)) add(icon); } }
public TutorialItem( String text, int index, int width ) { super(); icon.frame( film.get( index ) ); label.text( text ); label.maxWidth = width - (int)icon.width() - GAP; label.measure(); height = Math.max( icon.height(), label.height() ) + GAP; }
public BadgeButton( Badges.Badge badge ) { super(); this.badge = badge; active = (badge != null); icon = active ? BadgeBanner.image(badge.image) : new Image( Assets.LOCKED ); add(icon); setSize( icon.width(), icon.height() ); }
@Override protected void layout() { super.layout(); avatar.x = align( x + (width - avatar.width()) / 2 ); avatar.y = align( y + (height - avatar.height() - name.height()) / 2 ); name.x = align( x + (width - name.width()) / 2 ); name.y = avatar.y + avatar.height() + SCALE; emitter.pos( avatar.x, avatar.y, avatar.width(), avatar.height() ); }
@Override protected void layout() { super.layout(); image.x = x + (width - image.width()) / 2; image.y = y; align(image); label.x = x + (width - label.width()) / 2; label.y = image.y + image.height() +2; align(label); }
@Override protected void layout() { super.layout(); image.x = x + (width - image.width()) / 2; image.y = y; align(image); label.x = x + (width - label.width()) / 2; label.y = image.y + image.height() +2; align(label); }
public BadgeButton( Badges.Badge badge ) { super(); this.badge = badge; active = (badge != null); icon = active ? BadgeBanner.image(badge.image) : new Image( Assets.LOCKED ); add(icon); setSize( icon.width(), icon.height() ); }
@Override protected void layout() { super.layout(); image.x = align( x + (width - image.width()) / 2 ); image.y = align( y ); label.x = align( x + (width - label.width()) / 2 ); label.y = align( image.y + image.height() +2 ); }