Better emulation of main menu behavior.
- Pressing 'Esc' will now always enter the MainMenuExit state. - Returning from MainMenuExit state does not reset button states: these must be manually reset by calling the reset() method. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -176,6 +176,7 @@ public class GameRanking extends BasicGameState {
|
||||
game.enterState(Opsu.STATE_GAME, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||
} else if (exitButton.contains(x, y)) {
|
||||
SoundController.playSound(SoundController.SOUND_MENUBACK);
|
||||
((MainMenu) game.getState(Opsu.STATE_MAINMENU)).reset();
|
||||
game.enterState(Opsu.STATE_MAINMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||
} else if (Utils.getBackButton().contains(x, y)) {
|
||||
MusicController.pause();
|
||||
|
||||
Reference in New Issue
Block a user