diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-23 14:56:29 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-23 14:56:29 +0100 |
commit | cfc4fb12266f8630412bd58261d35d9087541f54 (patch) | |
tree | 6dde31d06ea491d76733144743273bdc4130390f /core | |
parent | 0c1fcd5a34a364862c1c54333efa5e18fc706348 (diff) | |
download | RustAndDust-cfc4fb12266f8630412bd58261d35d9087541f54.zip RustAndDust-cfc4fb12266f8630412bd58261d35d9087541f54.tar.gz |
Hud: block everything else if a dialog is visible
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index 4738c06..a5dfe0a 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -135,9 +135,12 @@ public class Hud implements Disposable hit = null; for (Widget w : dialogs) { - if (w.visible && w.hit(x, y)) { - hit = w; - break; + if (w.visible) { + if (w.hit(x, y)) { + hit = w; + break; + } + return false; } } if (hit == null) { |