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-02-12 16:36:07 -0500
committerStarla Insigna <hatkirby@fourisland.com>2009-02-12 16:36:07 -0500
commitbbf294dbf6b552751e5d9f3fb66188bd1bee724b (patch)
tree1e29d91a6e8a3b9d26ec874169de85928d4ec56f /src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java
parent3cd96daaf22236e4eb15c6422f772abf08351023 (diff)
downloadfourpuzzle-bbf294dbf6b552751e5d9f3fb66188bd1bee724b.tar.gz
fourpuzzle-bbf294dbf6b552751e5d9f3fb66188bd1bee724b.tar.bz2
fourpuzzle-bbf294dbf6b552751e5d9f3fb66188bd1bee724b.zip
Engine: Wrote Message System
MessageWindow now has a static method run by SpecialEvent that triggers the message box. This method blocks until the message is complete and renders via Display's new feature. The message box also now features the "next" arrow and the letters gradually appear.

Display has also been re-worked to have a list of a new interface called Renderable, which is any object that can be rendered. Such objects (such as MessageWindow) can register to Display, which will render them onto the game frame after the GameState has been rendered.

Closes #5.
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java')
-rwxr-xr-xsrc/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java index 3ed23c3..a20062d 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java
@@ -23,7 +23,6 @@ import com.fourisland.fourpuzzle.gamestate.mapview.event.specialmove.MoveEventTh
23import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.AutomaticViewpoint; 23import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.AutomaticViewpoint;
24import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.Viewpoint; 24import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.Viewpoint;
25import com.fourisland.fourpuzzle.util.Functions; 25import com.fourisland.fourpuzzle.util.Functions;
26import com.fourisland.fourpuzzle.window.MessageWindow;
27import java.awt.Graphics2D; 26import java.awt.Graphics2D;
28import java.awt.event.KeyEvent; 27import java.awt.event.KeyEvent;
29import java.awt.image.BufferedImage; 28import java.awt.image.BufferedImage;
@@ -229,11 +228,6 @@ public class MapViewGameState implements GameState {
229 228
230 g.drawImage(eventLayer, 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null); 229 g.drawImage(eventLayer, 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null);
231 g.drawImage(currentMap.renderUpper(), 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null); 230 g.drawImage(currentMap.renderUpper(), 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null);
232
233 if (mw != null)
234 {
235 mw.render(g);
236 }
237 } 231 }
238 232
239 public void setCurrentMap(String mapName) 233 public void setCurrentMap(String mapName)
@@ -256,11 +250,5 @@ public class MapViewGameState implements GameState {
256 { 250 {
257 currentViewpoint = viewpoint; 251 currentViewpoint = viewpoint;
258 } 252 }
259
260 volatile MessageWindow mw = null;
261 public void displayMessage(String message)
262 {
263 mw = new MessageWindow(message);
264 }
265 253
266} 254}