summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-12 16:51:57 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-12 16:51:57 +0200
commitb30ebb738030c63971e6ff7d8f7fb4cc58506149 (patch)
tree6cb374164929defec772bc6728070159d29dbd99 /core
parentcd505c803951459cfcdd183716371e5c584fc5d2 (diff)
downloadRustAndDust-b30ebb738030c63971e6ff7d8f7fb4cc58506149.zip
RustAndDust-b30ebb738030c63971e6ff7d8f7fb4cc58506149.tar.gz
MenuScreen: improve versionLabel position
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/RustAndDust.java2
-rw-r--r--core/src/ch/asynk/rustanddust/screens/MenuScreen.java4
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();
}