summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/OkCancel.java11
1 files changed, 11 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 084e868..0ea04c3 100644
--- a/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
+++ b/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
@@ -34,6 +34,17 @@ public class OkCancel extends Patch
this.visible = false;
}
+ public void updatePosition()
+ {
+ if (!visible) return;
+ float dx = (position.getX(rect.width) - rect.x);
+ float dy = (position.getY(rect.height) - rect.y);
+ translate(dx, dy);
+ label.translate(dx, dy);
+ okBtn.translate(dx, dy);
+ cancelBtn.translate(dx, dy);
+ }
+
public void show(String msg, Action action)
{
show(msg, action, Position.MIDDLE_CENTER);