From 311fdfb51e5d560377c449d31e7dc546da566a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 9 Nov 2014 00:39:59 +0100 Subject: remove LabelButton --- .../ch/asynk/tankontank/game/hud/LabelButton.java | 47 ---------------------- 1 file changed, 47 deletions(-) delete mode 100644 core/src/ch/asynk/tankontank/game/hud/LabelButton.java 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); - } -} -- cgit v1.1-2-g2b99