1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Use PreLoad on music controller.

This commit is contained in:
Huo Yaoyuan 2016-11-03 22:38:10 +08:00
parent f2a8cc0c29
commit 9e0fbed748

View File

@ -103,12 +103,14 @@ namespace osu.Game
});
(Chat = new ChatConsole(API)).Preload(game, Add);
(MusicController = new MusicController()).Preload(game, Add);
(Toolbar = new Toolbar
{
OnHome = delegate { MainMenu?.MakeCurrent(); },
OnSettings = Options.ToggleVisibility,
OnPlayModeChange = delegate (PlayMode m) { PlayMode.Value = m; },
OnMusicController = MusicController.ToggleVisibility
}).Preload(game, t =>
{
PlayMode.ValueChanged += delegate { Toolbar.SetGameMode(PlayMode.Value); };