Пример #1
0
 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);
 }
Пример #2
0
 protected void renderGeometry() {
   int x = getWidth() - icon_quad.getWidth();
   int y = (getHeight() - icon_quad.getHeight()) / 2;
   icon_quad.render(x, y);
 }
Пример #3
0
 public GUIIcon(Quad icon) {
   setDim(icon.getWidth(), icon.getHeight());
   setCanFocus(false);
   this.icon_quad = icon;
 }