Esempio n. 1
0
  @Override
  protected void addCustomLabels() {

    Text levelText =
        new Text(0, camera.getHeight() * 0.96f, resourcesManager.levelFont, "Level", vbom);
    levelText.setScaleCenter(0, 0);
    levelText.setScale(0.3f);
    attachChild(levelText);

    Text level =
        new Text(
            0,
            camera.getHeight() * 0.85f,
            resourcesManager.levelFont,
            String.valueOf(gameService.getLevel().getId()),
            vbom);
    attachChild(level);
  }
Esempio n. 2
0
  public static void wrapY(Text text, IEntity parent, float textBoundingFactorY) {
    float pScale =
        getWrapScale(text, parent.getWidth(), textBoundingFactorY * parent.getHeight(), 1f);

    text.setScale(pScale);
  }
Esempio n. 3
0
  public static void wrap(Text text, float pWidth, float pHeight, float boundingFactor) {
    float scale = getWrapScale(text, pWidth, pHeight, boundingFactor);

    text.setScale(scale);
    // child.setSize(child.getWidth() * scale, child.getHeight() * scale);
  }