@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); }
public static void wrapY(Text text, IEntity parent, float textBoundingFactorY) { float pScale = getWrapScale(text, parent.getWidth(), textBoundingFactorY * parent.getHeight(), 1f); text.setScale(pScale); }
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); }