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:
@@ -939,13 +939,14 @@ public abstract class PuzzleController extends GameController
|
|||||||
public void keyReleased (KeyEvent e)
|
public void keyReleased (KeyEvent e)
|
||||||
{
|
{
|
||||||
int keycode = e.getKeyCode();
|
int keycode = e.getKeyCode();
|
||||||
if (keycode == KeyEvent.VK_ESCAPE) {
|
// toggle chatting (pause)
|
||||||
// toggle pausyness, my pussycat
|
if (keycode == KeyEvent.VK_ESCAPE || keycode == KeyEvent.VK_PAUSE) {
|
||||||
setChatting(!isChatting());
|
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);
|
setChatting(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user