Enabled application restarts.
- Pressing Ctrl+Shift+F5 in the options menu restarts the game. Beatmaps and sounds are not reloaded. - Use GameContainer.setForceExit(false) to trigger a restart after exiting. Other changes: - Fixed general issues with track pausing/pause states. - Store all background images loaded in OsuFiles in a static hash table, instead of in individual objects. This allows easier access to the allocated memory. - Only delete OSZ files if they were unzipped. (They were previously deleted in all cases.) - Moved more images (mods, playfield, lighting) into GameImage. - Moved OsuHitObject initialization inside Utils. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -209,7 +209,6 @@ public class SongMenu extends BasicGameState {
|
||||
|
||||
// song button background & graphics context
|
||||
Image menuBackground = GameImage.MENU_BUTTON_BG.getImage();
|
||||
OsuGroupNode.setBackground(menuBackground);
|
||||
|
||||
// song button coordinates
|
||||
buttonX = width * 0.6f;
|
||||
@@ -651,6 +650,13 @@ public class SongMenu extends BasicGameState {
|
||||
if (MusicController.isThemePlaying() && focusNode != null)
|
||||
MusicController.play(focusNode.osuFiles.get(focusNode.osuFileIndex), true);
|
||||
|
||||
// reset music track
|
||||
else if (resetTrack) {
|
||||
MusicController.pause();
|
||||
MusicController.playAt(MusicController.getOsuFile().previewTime, true);
|
||||
resetTrack = false;
|
||||
}
|
||||
|
||||
// unpause track
|
||||
else if (MusicController.isPaused())
|
||||
MusicController.resume();
|
||||
@@ -664,13 +670,6 @@ public class SongMenu extends BasicGameState {
|
||||
GameImage.destroySkinImages(); // destroy skin images, if any
|
||||
resetGame = false;
|
||||
}
|
||||
|
||||
// reset music track
|
||||
if (resetTrack) {
|
||||
MusicController.pause();
|
||||
MusicController.playAt(MusicController.getOsuFile().previewTime, true);
|
||||
resetTrack = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user