diff options
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Hud.java | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index c5fbe44..6c9f0b1 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -105,8 +105,8 @@ public class Ctrl implements Disposable public void animationsOver() { if (hud.dialogActive()) - return; - if (stateType == StateType.ANIMATION) + hud.notifyAnimationsEnd(); + else if (stateType == StateType.ANIMATION) leaveAnimationState(); } diff --git a/core/src/ch/asynk/rustanddust/game/Hud.java b/core/src/ch/asynk/rustanddust/game/Hud.java index 6d82ac8..b1750f8 100644 --- a/core/src/ch/asynk/rustanddust/game/Hud.java +++ b/core/src/ch/asynk/rustanddust/game/Hud.java @@ -248,6 +248,13 @@ public class Hud implements Disposable, Animation } } + public void notifyAnimationsEnd() + { + Widget dialog = dialogs.getFirst(); + if (dialog == engagement) + closeDialog(); + } + public boolean dialogActive() { return (dialogs.size() > 0); |