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
This commit is contained in:
Ray Greenwell
2004-12-22 00:23:10 +00:00
parent 6b8ac486b3
commit 60582d2f5c
@@ -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);
}
}