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
|
// intercept close requests in game-related states and return to song menu
|
||||||
if (id == STATE_GAME || id == STATE_GAMEPAUSEMENU || id == STATE_GAMERANKING) {
|
if (id == STATE_GAME || id == STATE_GAMEPAUSEMENU || id == STATE_GAMERANKING) {
|
||||||
// start playing track at preview position
|
// start playing track at preview position
|
||||||
((SongMenu) this.getState(Opsu.STATE_SONGMENU)).resetGameDataOnLoad();
|
SongMenu songMenu = (SongMenu) this.getState(Opsu.STATE_SONGMENU);
|
||||||
MusicController.pause();
|
songMenu.resetGameDataOnLoad();
|
||||||
MusicController.resume();
|
if (id == STATE_GAME) {
|
||||||
|
MusicController.pause();
|
||||||
|
MusicController.resume();
|
||||||
|
} else
|
||||||
|
songMenu.resetTrackOnLoad();
|
||||||
this.enterState(Opsu.STATE_SONGMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
this.enterState(Opsu.STATE_SONGMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user