summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/Position.java38
2 files changed, 23 insertions, 17 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 7c31aa0..49b8a34 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -76,7 +76,7 @@ public class Hud implements Disposable
{
Position position = ctrl.battle.getHudPosition(ctrl.player);
playerInfo.update(ctrl.player, position);
- actionButtons.setPosition(position.down());
+ actionButtons.setPosition(position.horizontalMirror());
}
public void animate(float delta)
diff --git a/core/src/ch/asynk/tankontank/game/hud/Position.java b/core/src/ch/asynk/tankontank/game/hud/Position.java
index 0556aba..4f490bd 100644
--- a/core/src/ch/asynk/tankontank/game/hud/Position.java
+++ b/core/src/ch/asynk/tankontank/game/hud/Position.java
@@ -15,45 +15,51 @@ public enum Position
BOTTOM_RIGHT,
BOTTOM_CENTER;
- public Position down()
+ public Position verticalMirror()
{
- Position p = BOTTOM_LEFT;
+ Position p = this;
switch(this) {
case TOP_LEFT:
+ p = TOP_RIGHT;
+ break;
case MIDDLE_LEFT:
- case BOTTOM_LEFT:
- p = BOTTOM_LEFT;
+ p = MIDDLE_RIGHT;
break;
- case TOP_CENTER:
- case MIDDLE_CENTER:
- case BOTTOM_CENTER:
- p = BOTTOM_CENTER;
+ case BOTTOM_LEFT:
+ p = BOTTOM_RIGHT;
break;
case TOP_RIGHT:
+ p = TOP_LEFT;
+ break;
case MIDDLE_RIGHT:
+ p = MIDDLE_LEFT;
+ break;
case BOTTOM_RIGHT:
- p = BOTTOM_RIGHT;
+ p = BOTTOM_LEFT;
break;
}
return p;
}
- public Position up()
+ public Position horizontalMirror()
{
- Position p = TOP_LEFT;
+ Position p = this;
switch(this) {
case TOP_LEFT:
- case MIDDLE_LEFT:
+ p = BOTTOM_LEFT;
+ break;
+ case TOP_CENTER:
+ p = BOTTOM_CENTER;
+ break;
+ case TOP_RIGHT:
+ p = BOTTOM_RIGHT;
+ break;
case BOTTOM_LEFT:
p = TOP_LEFT;
break;
- case TOP_CENTER:
- case MIDDLE_CENTER:
case BOTTOM_CENTER:
p = TOP_CENTER;
break;
- case TOP_RIGHT:
- case MIDDLE_RIGHT:
case BOTTOM_RIGHT:
p = TOP_RIGHT;
break;