Implemented skinnable theme songs.

Plays a theme song when opsu! starts (can be disabled in options).  The default song is "welcome to osu!" by nekodex, uploaded by CyberKitsune.

To change the song, place a new "theme.osu" in the skins folder and edit the file name, metadata, and song length (at minimum).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2014-12-20 18:17:04 -05:00
parent 9d3a12ad9c
commit ce0eccd32b
9 changed files with 101 additions and 7 deletions

View File

@@ -293,11 +293,13 @@ public class MainMenu extends BasicGameState {
else if (!MusicController.isTrackLoading())
MusicController.resume();
} else if (musicNext.contains(x, y)) {
boolean isTheme = MusicController.isThemePlaying();
SongMenu menu = (SongMenu) game.getState(Opsu.STATE_SONGMENU);
OsuGroupNode node = menu.setFocus(Opsu.groups.getRandomNode(), -1, true);
if (node != null)
if (node != null && !isTheme)
previous.add(node.index);
if (Options.isDynamicBackgroundEnabled())
if (Options.isDynamicBackgroundEnabled() &&
MusicController.getOsuFile() != null && !MusicController.isThemePlaying())
bgAlpha = 0f;
} else if (musicPrevious.contains(x, y)) {
if (!previous.isEmpty()) {