diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-09 00:39:59 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-09 00:39:59 +0100 |
commit | 311fdfb51e5d560377c449d31e7dc546da566a7f (patch) | |
tree | 7800a493c459157e77c06accc4c4937213a606fc /core | |
parent | 197b754359748320975c013daaf3cc6c4ff6f37a (diff) | |
download | RustAndDust-311fdfb51e5d560377c449d31e7dc546da566a7f.zip RustAndDust-311fdfb51e5d560377c449d31e7dc546da566a7f.tar.gz |
remove LabelButton
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/hud/LabelButton.java | 47 |
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); - } -} |