public StatusIcon(int label_width, Quad icon, String tooltip) { this.tooltip = tooltip; setDim(icon.getWidth() + label_width, icon.getHeight()); setCanFocus(true); // only to enable tool tips. focus is given to delegate this.icon_quad = icon; label = new Label("", Skin.getSkin().getEditFont(), label_width, Label.ALIGN_RIGHT); addChild(label); // label.setPos(icon.getWidth(), (getHeight() - label.getFont().getHeight())/2); label.setPos(0, (getHeight() - label.getFont().getHeight()) / 2); }
protected void renderGeometry() { int x = getWidth() - icon_quad.getWidth(); int y = (getHeight() - icon_quad.getHeight()) / 2; icon_quad.render(x, y); }
public GUIIcon(Quad icon) { setDim(icon.getWidth(), icon.getHeight()); setCanFocus(false); this.icon_quad = icon; }
public void renderGeometry() { icon_quad.render(0, 0); }