summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/LabelButton.java47
1 files changed, 0 insertions, 47 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/LabelButton.java b/core/src/ch/asynk/tankontank/game/hud/LabelButton.java
deleted file mode 100644
index e63efc1..0000000
--- a/core/src/ch/asynk/tankontank/game/hud/LabelButton.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package ch.asynk.tankontank.game.hud;
-
-import com.badlogic.gdx.graphics.g2d.Batch;
-import com.badlogic.gdx.graphics.g2d.BitmapFont;
-import com.badlogic.gdx.graphics.g2d.TextureAtlas;
-
-public class LabelButton extends Button
-{
- private Label label;
-
- public LabelButton(TextureAtlas atlas, String base, BitmapFont font, String text)
- {
- super(atlas, base);
- this.label = new Label(font, text);
- }
-
- @Override
- public void dispose()
- {
- super.dispose();
- label.dispose();
- }
-
- public void setPosition(float x, float y)
- {
- super.setPosition(x, y);
- setLabelPosition((x + ((getWidth() - label.getWidth()) / 2)), (y + ((getHeight() - label.getHeight()) / 2)));
- }
-
- public void setLabelPosition(float x, float y)
- {
- label.setPosition(x, y);
- }
-
- public void write(String text)
- {
- this.label.write(text);
- }
-
- @Override
- public void draw(Batch batch)
- {
- if (!visible) return;
- super.draw(batch);
- label.draw(batch);
- }
-}