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 arrow( Image icon, int count ){ super( icon ); text = new BitmapText( Integer.toString(count), PixelScene.pixelFont); text.measure(); add(text); }
public arrow( Image icon, int count ){ super( icon ); text = new BitmapText( Integer.toString(count), PixelScene.pixelFont); text.measure(); add(text); }
public void secondary( String text, boolean highlighted ) { secondary.text( text ); secondary.measure(); secondary.hardlight( highlighted ? SECONDARY_COLOR_H : SECONDARY_COLOR_N ); } }
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( 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(); } };
private void statSlot( String label, String value ) { BitmapText txt = PixelScene.createText( label, 6 ); txt.y = pos; add( txt ); txt = PixelScene.createText( value, 6 ); txt.measure(); txt.x = PixelScene.align( WIDTH * 0.65f ); txt.y = pos; add( txt ); pos += GAP + txt.baseLine(); }
private float statSlot( Group parent, String label, String value, float pos ) { BitmapText txt = PixelScene.createText( label, 7 ); txt.y = pos; parent.add( txt ); txt = PixelScene.createText( value, 6 ); txt.measure(); txt.x = PixelScene.align( WIDTH * 0.65f ); txt.y = pos; parent.add( txt ); return pos + GAP + txt.baseLine(); } }
public MobTitle( Mob mob ) { name = PixelScene.createText( Utils.capitalize( mob.name ), 9 ); name.hardlight( TITLE_COLOR ); name.measure(); add( name ); image = mob.sprite(); add( image ); health = new HealthBar(); health.level( (float)mob.HP / mob.HT ); add( health ); buffs = new BuffIndicator( mob ); add( buffs ); }
@Override protected void layout() { panel.x = this.x; panel.y = this.y; panel.alpha(alpha); panel.visible = updateAvailable || !quiet; updateMessage.x = panel.x+panel.marginLeft(); updateMessage.y = panel.y+panel.marginTop(); updateMessage.measure(); updateMessage.alpha(alpha); updateMessage.visible = updateAvailable || !quiet; panel.size( panel.marginHor()+updateMessage.width(), panel.marginVer()+updateMessage.height()-1); this.width = panel.width(); this.height = panel.height(); }