Minor main menu changes.

- Changed the time format displayed on the main menu to match osu!.
- If no beatmaps are loaded, redirect the user to the downloads menu instead of an empty song menu.

Also, start showing bar notifications at time 1 instead of 0 so it can be called in enter() methods without visual delays.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-03-19 22:10:38 -04:00
parent cb8c7c399c
commit fc5f56f75a
4 changed files with 45 additions and 10 deletions

View File

@@ -146,6 +146,9 @@ public class DownloadsMenu extends BasicGameState {
/** Beatmap set ID of the current beatmap being previewed, or -1 if none. */
private int previewID = -1;
/** The bar notification to send upon entering the state. */
private String barNotificationOnLoad;
// game-related variables
private GameContainer container;
private StateBasedGame game;
@@ -739,6 +742,10 @@ public class DownloadsMenu extends BasicGameState {
startDownloadIndex = 0;
pageDir = Page.RESET;
previewID = -1;
if (barNotificationOnLoad != null) {
UI.sendBarNotification(barNotificationOnLoad);
barNotificationOnLoad = null;
}
}
@Override
@@ -789,4 +796,10 @@ public class DownloadsMenu extends BasicGameState {
}
}
}
/**
* Sends a bar notification upon entering the state.
* @param s the notification string
*/
public void notifyOnLoad(String s) { barNotificationOnLoad = s; }
}