Merge pull request #103 from huoyaoyuan/music-controller

Music controller
This commit is contained in:
Dean Herbert
2016-11-10 12:54:56 +09:00
committed by GitHub
11 changed files with 553 additions and 71 deletions

View File

@ -26,6 +26,7 @@ namespace osu.Game
{
public Toolbar Toolbar;
public ChatConsole Chat;
public MusicController MusicController;
public MainMenu MainMenu => intro?.ChildGameMode as MainMenu;
private Intro intro;
@ -106,12 +107,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); };