Handle overlay in ToolbarOverlayToggleButton.

This commit is contained in:
Huo Yaoyuan
2017-05-08 19:37:41 +08:00
parent e466380ee2
commit ced2332d20
5 changed files with 1 additions and 4 deletions

View File

@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Toolbar
private void load(ChatOverlay chat) private void load(ChatOverlay chat)
{ {
StateContainer = chat; StateContainer = chat;
Action = chat.ToggleVisibility;
} }
} }
} }

View File

@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Toolbar
private void load(MusicController music) private void load(MusicController music)
{ {
StateContainer = music; StateContainer = music;
Action = music.ToggleVisibility;
} }
} }
} }

View File

@ -22,7 +22,6 @@ namespace osu.Game.Overlays.Toolbar
private void load(NotificationManager notificationManager) private void load(NotificationManager notificationManager)
{ {
StateContainer = notificationManager; StateContainer = notificationManager;
Action = notificationManager.ToggleVisibility;
} }
} }
} }

View File

@ -21,6 +21,7 @@ namespace osu.Game.Overlays.Toolbar
set set
{ {
stateContainer = value; stateContainer = value;
Action = stateContainer.ToggleVisibility;
stateContainer.StateChanged += stateChanged; stateContainer.StateChanged += stateChanged;
} }
} }

View File

@ -19,7 +19,6 @@ namespace osu.Game.Overlays.Toolbar
private void load(OptionsOverlay options) private void load(OptionsOverlay options)
{ {
StateContainer = options; StateContainer = options;
Action = options.ToggleVisibility;
} }
} }
} }