Interrupt OsuParser by pressing 'ESC' in Splash state.

Allows parsing only a subset of OsuFiles, in case parsing takes too long.

Other changes:
- Press 'ESC' three times to exit from the Splash state.
- Override Container.exit().
- Reset MusicController in closeRequested() to prevent an OpenAL error.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-01-18 15:26:00 -05:00
parent ee17b20b25
commit 53158fd310
7 changed files with 51 additions and 26 deletions

View File

@@ -134,11 +134,9 @@ public class MainMenuExit extends BasicGameState {
if (button != Input.MOUSE_LEFT_BUTTON)
return;
if (yesButton.contains(x, y)) {
Options.saveOptions();
Opsu.closeSocket();
if (yesButton.contains(x, y))
container.exit();
} else if (noButton.contains(x, y))
else if (noButton.contains(x, y))
game.enterState(Opsu.STATE_MAINMENU, new EmptyTransition(), new FadeInTransition(Color.black));
}
@@ -146,8 +144,6 @@ public class MainMenuExit extends BasicGameState {
public void keyPressed(int key, char c) {
switch (key) {
case Input.KEY_1:
Options.saveOptions();
Opsu.closeSocket();
container.exit();
break;
case Input.KEY_2: