From b30ebb738030c63971e6ff7d8f7fb4cc58506149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 12 May 2016 16:51:57 +0200 Subject: MenuScreen: improve versionLabel position --- core/src/ch/asynk/rustanddust/RustAndDust.java | 2 ++ core/src/ch/asynk/rustanddust/screens/MenuScreen.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/RustAndDust.java b/core/src/ch/asynk/rustanddust/RustAndDust.java index 3c0835e..43fbe7e 100644 --- a/core/src/ch/asynk/rustanddust/RustAndDust.java +++ b/core/src/ch/asynk/rustanddust/RustAndDust.java @@ -23,6 +23,8 @@ import ch.asynk.rustanddust.ui.Bg; public class RustAndDust extends Game { + public static final String VERSION = "v29"; + public static final String BG_PATCH = "bg"; public static final String FRAME_PATCH = "frame"; public static final String TTF_FONT = "skin/veteran-typewriter.ttf"; diff --git a/core/src/ch/asynk/rustanddust/screens/MenuScreen.java b/core/src/ch/asynk/rustanddust/screens/MenuScreen.java index 475f9d1..7599c90 100644 --- a/core/src/ch/asynk/rustanddust/screens/MenuScreen.java +++ b/core/src/ch/asynk/rustanddust/screens/MenuScreen.java @@ -77,7 +77,7 @@ public class MenuScreen implements Screen this.geFlag = new Sprite(game.getUiRegion(game.UI_GE_FLAG)); this.versionLabel = new Label(game.font); - this.versionLabel.write("v29"); + this.versionLabel.write(RustAndDust.VERSION); this.ctrl = new MenuCtrl(game); Gdx.input.setInputProcessor(new InputAdapter() { @@ -181,7 +181,7 @@ public class MenuScreen implements Screen setCenteredPosition(usFlag, xPath[0], yPath[0]); setCenteredPosition(geFlag, xPath[n - 1], yPath[n - 1]); - versionLabel.setPosition(xPath[0] - 190, yPath[0]); + versionLabel.setPosition(xPath[0] - 190 - versionLabel.getWidth() / 2, yPath[0] - versionLabel.getHeight() / 2); ctrl.computePosition(); } -- cgit v1.1-2-g2b99