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:
@@ -649,6 +649,9 @@ public class Game extends BasicGameState {
|
||||
@Override
|
||||
public void enter(GameContainer container, StateBasedGame game)
|
||||
throws SlickException {
|
||||
if (restart == RESTART_NEW)
|
||||
osu = MusicController.getOsuFile();
|
||||
|
||||
if (osu == null || osu.objects == null)
|
||||
throw new RuntimeException("Running game with no OsuFile loaded.");
|
||||
|
||||
@@ -810,12 +813,6 @@ public class Game extends BasicGameState {
|
||||
public static void setRestart(byte restart) { Game.restart = restart; }
|
||||
public static byte getRestart() { return Game.restart; }
|
||||
|
||||
/**
|
||||
* Sets or returns the associated OsuFile.
|
||||
*/
|
||||
public static void setOsuFile(OsuFile osu) { Game.osu = osu; }
|
||||
public static OsuFile getOsuFile() { return osu; }
|
||||
|
||||
/**
|
||||
* Returns the associated GameScore object.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user