diff options
| author | ilotterytea <iltsu@alright.party> | 2022-08-31 03:09:20 +0600 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2022-08-31 03:09:20 +0600 |
| commit | 6c9c14d306fee3515fcc9625898be2fbed989e23 (patch) | |
| tree | c6837fc4cb9d6b3ec2d07ac5838ecf22a9d70182 /core | |
| parent | 175b5826c8dcc1c0a6562a2d63e16d55ea169bb3 (diff) | |
debug label lol
Diffstat (limited to 'core')
| -rw-r--r-- | core/src/com/ilotterytea/maxoning/ui/DebugLabel.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/src/com/ilotterytea/maxoning/ui/DebugLabel.java b/core/src/com/ilotterytea/maxoning/ui/DebugLabel.java new file mode 100644 index 0000000..9300962 --- /dev/null +++ b/core/src/com/ilotterytea/maxoning/ui/DebugLabel.java @@ -0,0 +1,18 @@ +package com.ilotterytea.maxoning.ui; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.scenes.scene2d.ui.Label; +import com.badlogic.gdx.scenes.scene2d.ui.Skin; +import com.ilotterytea.maxoning.MaxonConstants; + +public class DebugLabel extends Label { + private static final String str_placeholder = "%s\n%s fps"; + + public DebugLabel(Skin skin) { + super(String.format(str_placeholder, MaxonConstants.GAME_VERSION, Gdx.graphics.getFramesPerSecond()), skin); + } + + @Override public void act(float delta) { + super.setText(String.format(str_placeholder, MaxonConstants.GAME_VERSION, Gdx.graphics.getFramesPerSecond())); + } +} |
