diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-02-23 09:20:19 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-02-23 09:20:19 -0500 |
commit | 284c53489b89a6e39027aeab27c258c8926f77f0 (patch) | |
tree | 51d0cd69236b0a43ce2b36149f62f18281dd86c6 /src/com/fourisland/fourpuzzle/window/MessageWindow.java | |
parent | 8b8e44782659c65b9899f81a1ad5e09477c37354 (diff) | |
download | fourpuzzle-284c53489b89a6e39027aeab27c258c8926f77f0.tar.gz fourpuzzle-284c53489b89a6e39027aeab27c258c8926f77f0.tar.bz2 fourpuzzle-284c53489b89a6e39027aeab27c258c8926f77f0.zip |
Engine: Added Event Thread cancellation
Diffstat (limited to 'src/com/fourisland/fourpuzzle/window/MessageWindow.java')
-rw-r--r-- | src/com/fourisland/fourpuzzle/window/MessageWindow.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/fourisland/fourpuzzle/window/MessageWindow.java b/src/com/fourisland/fourpuzzle/window/MessageWindow.java index 0057ca3..dab67d1 100644 --- a/src/com/fourisland/fourpuzzle/window/MessageWindow.java +++ b/src/com/fourisland/fourpuzzle/window/MessageWindow.java | |||
@@ -79,10 +79,16 @@ public class MessageWindow implements Renderable { | |||
79 | Display.registerRenderable(mw); | 79 | Display.registerRenderable(mw); |
80 | KeyboardInput.registerInputable(in); | 80 | KeyboardInput.registerInputable(in); |
81 | 81 | ||
82 | cdl.await(); | 82 | try |
83 | 83 | { | |
84 | Display.unregisterRenderable(mw); | 84 | cdl.await(); |
85 | KeyboardInput.unregisterInputable(in); | 85 | } catch (InterruptedException ex) |
86 | { | ||
87 | throw ex; | ||
88 | } finally { | ||
89 | Display.unregisterRenderable(mw); | ||
90 | KeyboardInput.unregisterInputable(in); | ||
91 | } | ||
86 | } | 92 | } |
87 | 93 | ||
88 | public static void displayMessage(String message) throws InterruptedException | 94 | public static void displayMessage(String message) throws InterruptedException |