diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-03-06 15:18:53 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-03-06 15:18:53 -0500 |
commit | 3c3e8ed4432fde2bdd60c49f29244a13e1e12243 (patch) | |
tree | 9f6b1dfa53bd3d12673732adbed411f537ad31bb /src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java | |
parent | 8e0383a3674f4d9c57b3a1b5667750a3e963a7bd (diff) | |
download | fourpuzzle-3c3e8ed4432fde2bdd60c49f29244a13e1e12243.tar.gz fourpuzzle-3c3e8ed4432fde2bdd60c49f29244a13e1e12243.tar.bz2 fourpuzzle-3c3e8ed4432fde2bdd60c49f29244a13e1e12243.zip |
Engine: Refactored MessageWindow
MessageWindow is now an Inputable and a Renderable, which allows it to tie in more logically with the rest of the system.
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java')
-rwxr-xr-x | src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java index 1a33158..ca3ba5e 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java | |||
@@ -47,21 +47,35 @@ public class SpecialEvent { | |||
47 | * MessageDisplaySettings().</p> | 47 | * MessageDisplaySettings().</p> |
48 | * | 48 | * |
49 | * <p>This function also automatically splits your message up into blocks that | 49 | * <p>This function also automatically splits your message up into blocks that |
50 | * will fit onthe screen (breaks at spaces). If there are too many words, | 50 | * will fit on the screen (breaks at spaces). If there are too many words, |
51 | * they will be held and displayed in the message area after the prior | 51 | * they will be held and displayed in the message area after the prior |
52 | * message has been read.</p> | 52 | * message has been read.</p> |
53 | * | 53 | * |
54 | * <p>Message Escapes can be used to preform specific actions during text | ||
55 | * display. For instance, <code>\C[number]</code> changes the text color to | ||
56 | * the color on the System Graphic represented by "number".</p> | ||
57 | * | ||
54 | * @param message The message to display | 58 | * @param message The message to display |
55 | * @throws InterruptedException | 59 | * @throws InterruptedException |
56 | */ | 60 | */ |
57 | public void DisplayMessage(String message) throws InterruptedException | 61 | public void DisplayMessage(String message) throws InterruptedException |
58 | { | 62 | { |
63 | MessageWindow mw; | ||
64 | |||
59 | if (faceSet.equals("")) | 65 | if (faceSet.equals("")) |
60 | { | 66 | { |
61 | MessageWindow.displayMessage(message); | 67 | mw = new MessageWindow(message); |
62 | } else { | 68 | } else { |
63 | MessageWindow.displayMessage(message, faceSet, face); | 69 | mw = new MessageWindow(message, faceSet, face); |
64 | } | 70 | } |
71 | |||
72 | Display.registerRenderable(mw); | ||
73 | KeyboardInput.registerInputable(mw); | ||
74 | |||
75 | mw.waitForCompletion(); | ||
76 | |||
77 | Display.unregisterRenderable(mw); | ||
78 | KeyboardInput.unregisterInputable(mw); | ||
65 | } | 79 | } |
66 | 80 | ||
67 | /** | 81 | /** |