summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-15 16:11:47 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-15 16:11:47 +0100
commit7fcb5662cb51d3c75d3a744102bd30a033665948 (patch)
tree3c87623d8f8cae9e5ce849e78c2383645fd3b682 /core/src
parentd840dc817d4a9110cf6451b80ac5e982c9af68b7 (diff)
downloadRustAndDust-7fcb5662cb51d3c75d3a744102bd30a033665948.zip
RustAndDust-7fcb5662cb51d3c75d3a744102bd30a033665948.tar.gz
OkCancel: add boolean to hide cancel button
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/OkCancel.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/OkCancel.java b/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
index 59d345c..56c3e96 100644
--- a/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
+++ b/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
@@ -26,6 +26,11 @@ public class OkCancel extends Bg
public void show(String msg, Position position)
{
+ show(msg, position, true);
+ }
+
+ public void show(String msg, Position position, boolean canCancel)
+ {
label.write(msg);
float height = (label.getHeight() + (4 * padding) + okBtn.getHeight());
@@ -41,6 +46,7 @@ public class OkCancel extends Bg
label.setPosition((x + padding), (y + okBtn.getHeight() + (2 * padding)));
visible = true;
ok = false;
+ cancelBtn.visible = canCancel;
}
public boolean hit(float x, float y)