コード例 #1
0
ファイル: Test.java プロジェクト: kalyanp/playn
 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
ファイル: Test.java プロジェクト: kalyanp/playn
 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();
 }