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:
@@ -352,6 +352,7 @@ public class SongMenu extends BasicGameState {
|
||||
// back
|
||||
if (Utils.getBackButton().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));
|
||||
return;
|
||||
}
|
||||
@@ -424,6 +425,7 @@ public class SongMenu extends BasicGameState {
|
||||
searchTimer = SEARCH_DELAY;
|
||||
} else {
|
||||
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));
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user