@Override protected void layout() { super.layout(); icon.y = this.y; txt.x = icon.width + GAP; txt.y = pos + (int)(icon.height - txt.baseLine()) / 2; }
@Override protected void layout() { super.layout(); icon.y = this.y; txt.x = icon.width + GAP; txt.y = pos + (int)(icon.height - txt.baseLine()) / 2; }
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 updateMatrix() { super.updateMatrix(); //the y value is set at the top of the character, not at the top of accents. Matrix.translate( matrix, 0, -Math.round((baseLine()*0.15f)/scale.y) ); }
@Override protected void layout() { icon.x = x; icon.y = y + (height - icon.height) / 2; PixelScene.align(icon); label.x = icon.x + icon.width + 2; label.y = y + (height - label.baseLine()) / 2; PixelScene.align(label); }
@Override protected void layout() { icon.x = x; icon.y = y + (height - icon.height) / 2; PixelScene.align(icon); label.x = icon.x + icon.width + 2; label.y = y + (height - label.baseLine()) / 2; PixelScene.align(label); }
@Override protected void layout() { super.layout(); float margin = (height - text.baseLine()) / 2; text.x = x + margin; text.y = y + margin; PixelScene.align(text); margin = (height - icon.height) / 2; icon.x = x + width - margin - icon.width; icon.y = y + margin; PixelScene.align(icon); }
@Override protected void layout() { super.layout(); btLabel.x = x + (width - btLabel.width()) / 2; btLabel.y = y + (height - btLabel.baseLine()) / 2 - 1; if (!selected) { btLabel.y -= 2; } PixelScene.align(btLabel); }
@Override protected void layout() { super.layout(); float margin = (height - text.baseLine()) / 2; text.x = x + margin; text.y = y + margin; PixelScene.align(text); margin = (height - icon.height) / 2; icon.x = x + width - margin - icon.width; icon.y = y + margin; PixelScene.align(icon); }
@Override protected void layout() { super.layout(); btLabel.x = x + (width - btLabel.width()) / 2; btLabel.y = y + (height - btLabel.baseLine()) / 2 - 1; if (!selected) { btLabel.y -= 2; } PixelScene.align(btLabel); }
private float statSlot( Group parent, String label, String value, float pos ) { RenderedText txt = PixelScene.renderText( label, 7 ); txt.y = pos; parent.add( txt ); txt = PixelScene.renderText( value, 7 ); txt.x = WIDTH * 0.65f; txt.y = pos; PixelScene.align(txt); parent.add( txt ); return pos + GAP + txt.baseLine(); } }
private void statSlot( String label, String value ) { RenderedText txt = PixelScene.renderText( label, 8 ); txt.y = pos; add( txt ); txt = PixelScene.renderText( value, 8 ); txt.x = WIDTH * 0.6f; txt.y = pos; PixelScene.align(txt); add( txt ); pos += GAP + txt.baseLine(); }
private void statSlot( String label, String value ) { RenderedText txt = PixelScene.renderText( label, 8 ); txt.y = pos; add( txt ); txt = PixelScene.renderText( value, 8 ); txt.x = WIDTH * 0.6f; txt.y = pos; PixelScene.align(txt); add( txt ); pos += GAP + txt.baseLine(); }
private void statSlot( String label, String value ) { RenderedText txt = PixelScene.renderText( label, 8 ); txt.y = pos; add( txt ); txt = PixelScene.renderText( value, 8 ); txt.x = WIDTH * 0.6f; txt.y = pos; PixelScene.align(txt); add( txt ); pos += GAP + txt.baseLine(); }
private void statSlot( String label, String value ) { RenderedText txt = PixelScene.renderText( label, 8 ); txt.y = pos; add( txt ); txt = PixelScene.renderText( value, 8 ); txt.x = WIDTH * 0.6f; txt.y = pos; PixelScene.align(txt); add( txt ); pos += GAP + txt.baseLine(); }
private float statSlot( Group parent, String label, String value, float pos ) { RenderedText txt = PixelScene.renderText( label, 7 ); txt.y = pos; parent.add( txt ); txt = PixelScene.renderText( value, 7 ); txt.x = WIDTH * 0.65f; txt.y = pos; PixelScene.align(txt); parent.add( txt ); return pos + GAP + txt.baseLine(); } }
@Override protected void layout() { image.x = 0; image.y = Math.max( 0, name.height() + health.height() - image.height ); name.x = image.width + GAP; name.y = Math.max( 0, image.height - health.height() - name.height()); float w = width - image.width - GAP; health.setRect(image.width + GAP, name.y + name.height(), w, health.height()); buffs.setPos( name.x + name.width() + GAP-1, name.y + name.baseLine() - BuffIndicator.SIZE-2 ); height = health.bottom(); } }
public BuffSlot( Buff buff ){ super(); this.buff = buff; int index = buff.icon(); icon = new Image( icons ); icon.frame( film.get( index ) ); buff.tintIcon(icon); icon.y = this.y; add( icon ); txt = PixelScene.renderText( buff.toString(), 8 ); txt.x = icon.width + GAP; txt.y = this.y + (int)(icon.height - txt.baseLine()) / 2; add( txt ); }
@Override protected void layout() { super.layout(); avatar.x = x; avatar.y = y + (height - avatar.height() - name.baseLine() - 2)/2f; PixelScene.align(avatar); name.x = x + (avatar.width() - name.width())/2f; name.y = avatar.y + avatar.height() + 2; PixelScene.align(name); heroItem.setPos(x + width - BTN_SIZE, y); heroLoadout.setPos(x + width - BTN_SIZE, heroItem.bottom()); heroMisc.setPos(x + width - BTN_SIZE, heroLoadout.bottom()); heroSubclass.setPos(x + width - BTN_SIZE, heroMisc.bottom()); }