diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-02-16 12:38:08 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-02-16 12:38:08 -0500 |
commit | 1db6402b9171fc13b377b01d49531659a4e1fc76 (patch) | |
tree | 7bbf06df73b0b0f5c232ead87ba72c6cd3405799 /src/com/fourisland/fourpuzzle/window/MessageWindow.java | |
parent | 6b188d5f1415c69cc62fcbd853802f279fcd690d (diff) | |
download | fourpuzzle-1db6402b9171fc13b377b01d49531659a4e1fc76.tar.gz fourpuzzle-1db6402b9171fc13b377b01d49531659a4e1fc76.tar.bz2 fourpuzzle-1db6402b9171fc13b377b01d49531659a4e1fc76.zip |
Engine: Abstracted action key
Because some people prefer to use the space bar as the action key rather than the enter key, KeyInput now has a method that checks if either is down. Action key requiring conditions use this now instead of manually checking the key.
Diffstat (limited to 'src/com/fourisland/fourpuzzle/window/MessageWindow.java')
-rw-r--r-- | src/com/fourisland/fourpuzzle/window/MessageWindow.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/fourisland/fourpuzzle/window/MessageWindow.java b/src/com/fourisland/fourpuzzle/window/MessageWindow.java index 413805d..0057ca3 100644 --- a/src/com/fourisland/fourpuzzle/window/MessageWindow.java +++ b/src/com/fourisland/fourpuzzle/window/MessageWindow.java | |||
@@ -16,7 +16,6 @@ import com.fourisland.fourpuzzle.util.Renderable; | |||
16 | import java.awt.Graphics2D; | 16 | import java.awt.Graphics2D; |
17 | import java.awt.Rectangle; | 17 | import java.awt.Rectangle; |
18 | import java.awt.TexturePaint; | 18 | import java.awt.TexturePaint; |
19 | import java.awt.event.KeyEvent; | ||
20 | import java.awt.image.BufferedImage; | 19 | import java.awt.image.BufferedImage; |
21 | import java.util.ArrayList; | 20 | import java.util.ArrayList; |
22 | import java.util.List; | 21 | import java.util.List; |
@@ -65,7 +64,7 @@ public class MessageWindow implements Renderable { | |||
65 | Inputable in = new Inputable() { | 64 | Inputable in = new Inputable() { |
66 | public void processInput(KeyInput key) | 65 | public void processInput(KeyInput key) |
67 | { | 66 | { |
68 | if ((key.getKey() == KeyEvent.VK_ENTER) || (key.getKey() == KeyEvent.VK_SPACE)) | 67 | if (key.isActionDown()) |
69 | { | 68 | { |
70 | if (mw.pushEnter()) | 69 | if (mw.pushEnter()) |
71 | { | 70 | { |