Quick fixes.
- Fixed a crash when closing the application in the ranking screen when viewing a score. - Fixed a minor bug where OsuGroupList fields were not being erased upon restart. - Dim the track volume by 50% when viewing a score. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -171,7 +171,10 @@ public class GameRanking extends BasicGameState {
|
||||
throws SlickException {
|
||||
Display.setTitle(game.getTitle());
|
||||
Utils.getBackButton().setScale(1f);
|
||||
if (data.isGameplay())
|
||||
if (!data.isGameplay()) {
|
||||
if (!MusicController.isTrackDimmed())
|
||||
MusicController.toggleTrackDimmed(0.5f);
|
||||
} else
|
||||
SoundController.playSound(SoundEffect.APPLAUSE);
|
||||
}
|
||||
|
||||
@@ -199,7 +202,10 @@ public class GameRanking extends BasicGameState {
|
||||
* Sets the associated GameData object.
|
||||
* @param data the GameData
|
||||
*/
|
||||
public void setGameData(GameData data) {
|
||||
this.data = data;
|
||||
}
|
||||
public void setGameData(GameData data) { this.data = data; }
|
||||
|
||||
/**
|
||||
* Returns the current GameData object (usually null unless state active).
|
||||
*/
|
||||
public GameData getGameData() { return data; }
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ public class MainMenu extends BasicGameState {
|
||||
// window focus change: increase/decrease theme song volume
|
||||
if (MusicController.isThemePlaying() &&
|
||||
MusicController.isTrackDimmed() == container.hasFocus())
|
||||
MusicController.toggleTrackDimmed();
|
||||
MusicController.toggleTrackDimmed(0.33f);
|
||||
|
||||
// fade in background
|
||||
if (bgAlpha < 0.9f) {
|
||||
|
||||
@@ -777,6 +777,10 @@ public class SongMenu extends BasicGameState {
|
||||
else if (MusicController.isPaused())
|
||||
MusicController.resume();
|
||||
|
||||
// undim track
|
||||
if (MusicController.isTrackDimmed())
|
||||
MusicController.toggleTrackDimmed(1f);
|
||||
|
||||
// reset song stack
|
||||
randomStack = new Stack<SongNode>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user