process common hotkeys in base state

This commit is contained in:
yugecin
2017-01-18 22:46:45 +01:00
parent 81b71d5703
commit 06a5deb3a1
7 changed files with 38 additions and 47 deletions

View File

@@ -1064,8 +1064,12 @@ public class SongMenu extends BaseOpsuState {
@Override
public boolean keyPressed(int key, char c) {
if (super.keyPressed(key, c)) {
return true;
}
// block input
if ((reloadThread != null && !(key == Input.KEY_ESCAPE || key == Input.KEY_F12)) || beatmapMenuTimer > -1 || isScrollingToFocusNode) {
if ((reloadThread != null && key != Input.KEY_ESCAPE) || beatmapMenuTimer > -1 || isScrollingToFocusNode) {
return true;
}
@@ -1145,16 +1149,6 @@ public class SongMenu extends BaseOpsuState {
displayContainer.switchState(ButtonMenu.class);
}
return true;
case Input.KEY_F7:
// TODO d
//Options.setNextFPS(container);
return true;
case Input.KEY_F10:
Options.toggleMouseDisabled();
return true;
case Input.KEY_F12:
Utils.takeScreenShot();
return true;
case Input.KEY_ENTER:
if (focusNode == null)
break;