Disallow escape as click key, move validity checks into Options.java

This commit is contained in:
Score_Under
2015-03-07 04:49:59 +00:00
parent 765aa21dfb
commit 9271e0d473
2 changed files with 30 additions and 12 deletions

View File

@@ -347,9 +347,9 @@ public class OptionsMenu extends BasicGameState {
public void keyPressed(int key, char c) {
// key entry state
if (keyEntryLeft || keyEntryRight) {
if (keyEntryLeft && Options.getGameKeyRight() != key)
if (keyEntryLeft)
Options.setGameKeyLeft(key);
else if (keyEntryRight && Options.getGameKeyLeft() != key)
else
Options.setGameKeyRight(key);
keyEntryLeft = keyEntryRight = false;
return;