Implemented dynamic main menu backgrounds.
- This can be switched off in the configuration file. - Credits: https://osu.ppy.sh/forum/t/98954 Other changes: - Removed OsuFile setters/getters from Game state, replaced with a 'getOsuFile()' method in MusicController (a more logical location). Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -144,7 +144,7 @@ public class GamePauseMenu extends BasicGameState {
|
||||
// 'esc' will normally unpause, but will return to song menu if health is zero
|
||||
if (Game.getRestart() == Game.RESTART_LOSE) {
|
||||
MusicController.stop();
|
||||
MusicController.playAt(Game.getOsuFile().previewTime, true);
|
||||
MusicController.playAt(MusicController.getOsuFile().previewTime, true);
|
||||
SoundController.playSound(SoundController.SOUND_MENUBACK);
|
||||
game.enterState(Opsu.STATE_SONGMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||
} else
|
||||
@@ -174,7 +174,7 @@ public class GamePauseMenu extends BasicGameState {
|
||||
unPause(Game.RESTART_MANUAL);
|
||||
} else if (backButton.contains(x, y)) {
|
||||
MusicController.pause(); // lose state
|
||||
MusicController.playAt(Game.getOsuFile().previewTime, true);
|
||||
MusicController.playAt(MusicController.getOsuFile().previewTime, true);
|
||||
SoundController.playSound(SoundController.SOUND_MENUBACK);
|
||||
game.enterState(Opsu.STATE_SONGMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user