Пример #1
0
 protected float addButton(String text, Runnable onClick, float x, float y) {
   ImageLayer button = game.ui.createButton(text, onClick);
   game.rootLayer.addAt(button, x, y);
   return x + button.width() + 10;
 }
Пример #2
0
 protected float addDescrip(String descrip, float x, float y, float width) {
   ImageLayer layer = createDescripLayer(descrip, width);
   game.rootLayer.addAt(layer, Math.round(x + (width - layer.width()) / 2), y);
   return y + layer.height();
 }