summary refs log tree commit diff stats
path: root/src/com/fourisland/fourpuzzle/window/MessageWindow.java
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-02-16 12:38:08 -0500
committerStarla Insigna <hatkirby@fourisland.com>2009-02-16 12:38:08 -0500
commit1db6402b9171fc13b377b01d49531659a4e1fc76 (patch)
tree7bbf06df73b0b0f5c232ead87ba72c6cd3405799 /src/com/fourisland/fourpuzzle/window/MessageWindow.java
parent6b188d5f1415c69cc62fcbd853802f279fcd690d (diff)
downloadfourpuzzle-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.java3
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;
16import java.awt.Graphics2D; 16import java.awt.Graphics2D;
17import java.awt.Rectangle; 17import java.awt.Rectangle;
18import java.awt.TexturePaint; 18import java.awt.TexturePaint;
19import java.awt.event.KeyEvent;
20import java.awt.image.BufferedImage; 19import java.awt.image.BufferedImage;
21import java.util.ArrayList; 20import java.util.ArrayList;
22import java.util.List; 21import 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 {