public GameButton( String primary ) { super( primary ); this.secondary.text(null ); }
public RedButton( String label ) { super(); text.text( label ); text.measure(); }
public LabeledTab( String label ) { super(); btLabel.text( label ); btLabel.measure(); }
public void text( String txt ) { text.text( txt ); text.measure(); }
public void text( String text ){ super.text( text ); measure(); }
public void secondary( String text, boolean highlighted ) { secondary.text( text ); secondary.measure(); secondary.hardlight( highlighted ? SECONDARY_COLOR_H : SECONDARY_COLOR_N ); } }
public ListItem( Badges.Badge badge ) { super(); this.badge = badge; icon.copy( BadgeBanner.image( badge.image )); label.text( badge.description ); }
public void text( String value ) { text.text( value ); text.measure(); layout(); }
public ListItem( GameAction gameAction, KeyPair keys ) { super(); this.gameAction = gameAction; this.keys = keys; action.text(gameAction.getDescription()); action.measure(); reconfigureKeysText(); }
public ListItem( Class<? extends Item> cl ) { super(); try { item = cl.newInstance(); // if (identified = item.isIdentified()) { sprite.view( item.image(), null ); label.text( item.name() ); // } else { // sprite.view( 127, null ); // label.text( item.trueName() ); // label.hardlight( 0xCCCCCC ); // } } catch (Exception e) { // Do nothing } }
public ListItem( Image icon, String text, int d ) { super(); this.icon.copy(icon); label.text( text ); if (d >= 0) { depth.text(Integer.toString(d)); depth.measure(); if (d == Dungeon.depth) { label.hardlight(TITLE_COLOR); depth.hardlight(TITLE_COLOR); } } }
public ListItem( Image icon, String text, int d ) { super(); this.icon.copy(icon); label.text( text ); if (d >= 0) { depth.text(Integer.toString(d)); depth.measure(); if (d == Dungeon.depth) { label.hardlight(TITLE_COLOR); depth.hardlight(TITLE_COLOR); } } }
public ListItem( Image icon, String text, int d ) { super(); this.icon.copy(icon); label.text( text ); if (d >= 0) { depth.text(Integer.toString(d)); depth.measure(); if (d == Dungeon.depth) { label.hardlight(TITLE_COLOR); depth.hardlight(TITLE_COLOR); } } }
public ListItem( Image icon, String text, int d ) { super(); this.icon.copy(icon); label.text( text ); if (d >= 0) { depth.text(Integer.toString(d)); depth.measure(); if (d == Dungeon.depth) { label.hardlight(TITLE_COLOR); depth.hardlight(TITLE_COLOR); } } }
@Override protected void onClick() { int val = YetAnotherPixelDungeon.loadingTips(); val = val < 3 ? val + 1 : 0; YetAnotherPixelDungeon.loadingTips(val); text.text( loadingTipsText( val ) ); text.measure(); layout(); } };
public DashboardItem( String text, int index ) { super(); image.frame( image.texture.uvRect( index * IMAGE_SIZE, 0, (index + 1) * IMAGE_SIZE, IMAGE_SIZE ) ); this.label.text( text ); this.label.measure(); setSize( SIZE, SIZE ); }
@Override protected void onClick(){ boolean val = !YetAnotherPixelDungeon.searchButton(); YetAnotherPixelDungeon.searchButton( val ); text.text( searchButtonsText( val ) ); text.measure(); layout(); } };
@Override public void update() { if (Dungeon.hero.isAlive()) { int v = Dungeon.hero.visibleEnemies(); if (v != lastNumber) { lastNumber = v; if (visible = lastNumber > 0) { number.text( Integer.toString( lastNumber ) ); number.measure(); placeNumber(); flash(); } } } else { visible = false; } super.update(); }
@Override protected void layout() { super.layout(); if (secondary.text().length() > 0) { text.y = align( y + (height - text.height() - secondary.baseLine()) / 2 ); secondary.x = align( x + (width - secondary.width()) / 2 ); secondary.y = align( text.y + text.height() ); } else { text.y = align( y + (height - text.baseLine()) / 2 ); } }