diff options
Diffstat (limited to 'core/src/ch/asynk')
| -rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index 8812061..09f2408 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -120,14 +120,17 @@ public class Hud implements Disposable      {          hit = null; -        if (actionButtons.touchDown(x, y)) +        if (okCancel.visible) { +            if (okCancel.hit(x, y)) +                hit = okCancel; +        } else if (stats.visible) { +            if (stats.hit(x, y)) +                hit = stats; +        } +        else if (actionButtons.touchDown(x, y))              hit = actionButtons;          else if (playerInfo.touchDown(x, y))              hit = playerInfo; -        else if (okCancel.hit(x, y)) -            hit = okCancel; -        else if (stats.hit(x, y)) -            hit = stats;          return (hit != null);      } | 
