public float reqHeight() { float reqHeight = 0; if (icon != null){ reqHeight = Math.max(icon.height() + 4, reqHeight); } if (text != null && !text.text().equals("")){ reqHeight = Math.max(text.baseLine() + 4, reqHeight); } return reqHeight; } }
public float reqHeight() { float reqHeight = 0; if (icon != null){ reqHeight = Math.max(icon.height() + 4, reqHeight); } if (text != null && !text.text().equals("")){ reqHeight = Math.max(text.baseLine() + 4, reqHeight); } return reqHeight; } }
@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(); if (icon != null) { icon.x = x + (width - icon.width()) / 2f; icon.y = y + (height - icon.height()) / 2f; PixelScene.align(icon); } }
@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 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 (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); } }
public Arc(PointF from, PointF to){ start = from; end = to; arc1 = new Image(Effects.get(Effects.Type.LIGHTNING)); arc1.x = start.x - arc1.origin.x; arc1.y = start.y - arc1.origin.y; arc1.origin.set( 0, arc1.height()/2 ); add( arc1 ); arc2 = new Image(Effects.get(Effects.Type.LIGHTNING)); arc2.origin.set( 0, arc2.height()/2 ); add( arc2 ); }
public Arc(PointF from, PointF to){ start = from; end = to; arc1 = new Image(Effects.get(Effects.Type.LIGHTNING)); arc1.x = start.x - arc1.origin.x; arc1.y = start.y - arc1.origin.y; arc1.origin.set( 0, arc1.height()/2 ); add( arc1 ); arc2 = new Image(Effects.get(Effects.Type.LIGHTNING)); arc2.origin.set( 0, arc2.height()/2 ); add( arc2 ); }
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(); 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); }
@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 ); }