private static void addLoadingMessage(Context context, Engine engine, Scene scene) {
   Font font = ResourceRegistry.getFont();
   Text label =
       new Text(
           0, 0, font, context.getString(R.string.loading), engine.getVertexBufferObjectManager());
   label.setHorizontalAlign(HorizontalAlign.CENTER);
   label.setX(engine.getCamera().getCenterX() - label.getWidth() / 2);
   label.setY(engine.getCamera().getCenterY() - label.getHeight() / 2);
   label.setColor(Color.WHITE);
   scene.attachChild(label);
 }
Beispiel #2
0
 public void setX(float pX) {
   bgRect.setX(pX);
   fgRect.setX(pX + FGRECT_MARGIN_WIDTH);
   fgText.setX(pX + BGRECT_MARGIN_WIDTH);
 }