From 60582d2f5c359aee0e42d9a4c5b41c82bc05cadd Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 22 Dec 2004 00:23:10 +0000 Subject: [PATCH] May as well let the PAUSE key pause/unpause, and cleaned up comments. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3281 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/puzzle/client/PuzzleController.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/puzzle/client/PuzzleController.java b/src/java/com/threerings/puzzle/client/PuzzleController.java index 8e4a800ef..0147ae134 100644 --- a/src/java/com/threerings/puzzle/client/PuzzleController.java +++ b/src/java/com/threerings/puzzle/client/PuzzleController.java @@ -939,13 +939,14 @@ public abstract class PuzzleController extends GameController public void keyReleased (KeyEvent e) { int keycode = e.getKeyCode(); - if (keycode == KeyEvent.VK_ESCAPE) { - // toggle pausyness, my pussycat + // toggle chatting (pause) + if (keycode == KeyEvent.VK_ESCAPE || keycode == KeyEvent.VK_PAUSE) { setChatting(!isChatting()); - } else if (keycode == KeyEvent.VK_P && !isChatting() && - !_panel._xlate.hasCommand(KeyEvent.VK_P)) { - // if they hit the P key while puzzling, pause + // pressing P also to pause (but not unpause), + // and only if it has not been reassigned + } else if (keycode == KeyEvent.VK_P && !isChatting() && + !_panel._xlate.hasCommand(KeyEvent.VK_P)) { setChatting(true); } }