diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/hud')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/hud/Button.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/Button.java b/core/src/ch/asynk/tankontank/game/hud/Button.java index ea94c2c..2d344b4 100644 --- a/core/src/ch/asynk/tankontank/game/hud/Button.java +++ b/core/src/ch/asynk/tankontank/game/hud/Button.java @@ -4,6 +4,7 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.utils.Disposable; +import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.math.Rectangle; @@ -99,4 +100,10 @@ public class Button implements Disposable public float getY() { return images[0].getY(); } public float getWidth() { return images[0].getWidth(); } public float getHeight() { return images[0].getHeight(); } + + public void draw(Batch batch) + { + if (!visible) return; + getImage().draw(batch); + } } |