Rather than greatly complicating the user interface (and code) for defining
custom keys to include a 'global' section, I've just re-added the P key in a hard-coded manner. If the P key is pressed, the puzzle isn't already paused, and the user has not redefined P to perform some other command in the puzzle, it will pause. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3279 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -938,9 +938,15 @@ public abstract class PuzzleController extends GameController
|
||||
protected KeyListener _globalKeyListener = new KeyAdapter() {
|
||||
public void keyReleased (KeyEvent e)
|
||||
{
|
||||
if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
|
||||
int keycode = e.getKeyCode();
|
||||
if (keycode == KeyEvent.VK_ESCAPE) {
|
||||
// toggle pausyness, my pussycat
|
||||
setChatting(!isChatting());
|
||||
} else if (keycode == KeyEvent.VK_P && !isChatting() &&
|
||||
!_panel._xlate.hasCommand(KeyEvent.VK_P)) {
|
||||
|
||||
// if they hit the P key while puzzling, pause
|
||||
setChatting(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user