summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-10-20 17:32:17 +0500
committerilotterytea <iltsu@alright.party>2024-10-20 17:32:17 +0500
commit512fcbd10b5869b2f242f3d39da4dc6b953a7256 (patch)
tree98f91c0a9d63fd204e3888866bc955343a892fbc
parentee5948b2aa62dd9a4b03e8cab459ee194ed27520 (diff)
upd: show the game version
-rw-r--r--core/src/kz/ilotterytea/maxon/ui/DebugWidget.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/src/kz/ilotterytea/maxon/ui/DebugWidget.java b/core/src/kz/ilotterytea/maxon/ui/DebugWidget.java
index 469f2f4..1797baa 100644
--- a/core/src/kz/ilotterytea/maxon/ui/DebugWidget.java
+++ b/core/src/kz/ilotterytea/maxon/ui/DebugWidget.java
@@ -10,7 +10,7 @@ import com.badlogic.gdx.utils.Align;
import kz.ilotterytea.maxon.MaxonConstants;
public class DebugWidget extends Table {
- private final Label fpsLabel;
+ private final Label fpsLabel, versionLabel;
private final Preferences preferences;
private boolean isEnabled;
@@ -20,14 +20,17 @@ public class DebugWidget extends Table {
super.pad(16f);
super.setFillParent(true);
super.align(Align.topRight);
+ super.setZIndex(10);
this.preferences = Gdx.app.getPreferences(MaxonConstants.GAME_APP_PACKAGE);
this.isEnabled = preferences.getBoolean("debug", false);
this.fpsLabel = new Label(Gdx.graphics.getFramesPerSecond() + " fps", skin);
+ this.versionLabel = new Label(MaxonConstants.GAME_NAME + " " + MaxonConstants.GAME_VERSION, skin);
if (isEnabled) {
- super.add(fpsLabel);
+ super.add(versionLabel).right().row();
+ super.add(fpsLabel).right();
}
}
@@ -41,7 +44,8 @@ public class DebugWidget extends Table {
this.preferences.flush();
if (isEnabled) {
- super.add(fpsLabel);
+ super.add(versionLabel).right().row();
+ super.add(fpsLabel).right();
} else {
super.clear();
}