summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk')
-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)