Follow-up to 924f528: small fix.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
924f528881
commit
d2b3249e2c
|
@ -169,9 +169,13 @@ public class Opsu extends StateBasedGame {
|
|||
// intercept close requests in game-related states and return to song menu
|
||||
if (id == STATE_GAME || id == STATE_GAMEPAUSEMENU || id == STATE_GAMERANKING) {
|
||||
// start playing track at preview position
|
||||
((SongMenu) this.getState(Opsu.STATE_SONGMENU)).resetGameDataOnLoad();
|
||||
MusicController.pause();
|
||||
MusicController.resume();
|
||||
SongMenu songMenu = (SongMenu) this.getState(Opsu.STATE_SONGMENU);
|
||||
songMenu.resetGameDataOnLoad();
|
||||
if (id == STATE_GAME) {
|
||||
MusicController.pause();
|
||||
MusicController.resume();
|
||||
} else
|
||||
songMenu.resetTrackOnLoad();
|
||||
this.enterState(Opsu.STATE_SONGMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user