summary refs log tree commit diff stats
path: root/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-03-24 09:13:16 -0400
committerStarla Insigna <hatkirby@fourisland.com>2009-03-24 09:13:16 -0400
commitde019d1faf3daa90898bb194d1aac64409ca8824 (patch)
tree09ca87bd0c7c6cd2e8e3df1353fc8d6504c3703d /src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java
parentaf19fd5898d839e1976f34960b21f8dfc2dd77eb (diff)
downloadfourpuzzle-de019d1faf3daa90898bb194d1aac64409ca8824.tar.gz
fourpuzzle-de019d1faf3daa90898bb194d1aac64409ca8824.tar.bz2
fourpuzzle-de019d1faf3daa90898bb194d1aac64409ca8824.zip
Engine: Fixed MessageWindow non-closure
Added code to MapViewGameState's deinitalize() that cancells the callbacks of all currently running events. Also added code to SpecialEvent's displayMessage() that allows an InterruptedException to kill the message.

With the problem with the Title Screen, it turned out that this bug had nothing to do with it, the Title Screen's interval was just too fast.

Fixes #18
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java')
-rwxr-xr-xsrc/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java index d3bd101..6cf9b10 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java
@@ -71,7 +71,11 @@ public class MapViewGameState implements GameState {
71 71
72 public void deinitalize() 72 public void deinitalize()
73 { 73 {
74 // Do nothing, yet 74 // If an event is running when the game state is closing, kill it
75 for (LayerEvent ev : currentMap.getEvents())
76 {
77 ev.getCallback().cancel();
78 }
75 } 79 }
76 80
77 public void processInput(KeyInput key) 81 public void processInput(KeyInput key)