summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game/hud
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-04 10:17:03 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-04 10:17:03 +0100
commit556f3e0d54f3489380d48538645e6b392bf4a47e (patch)
treeecfbd29b6f0da13c1f8b7182306cb2ebff5db60a /core/src/ch/asynk/tankontank/game/hud
parentabe256df2db166d41d457c2c80d9dece5782de87 (diff)
downloadRustAndDust-556f3e0d54f3489380d48538645e6b392bf4a47e.zip
RustAndDust-556f3e0d54f3489380d48538645e6b392bf4a47e.tar.gz
Button: add void draw(Batch batch)
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/hud')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/Button.java7
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);
+ }
}