From ced2332d20df70866b9fd458a5127de8aa0f59d7 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 8 May 2017 19:37:41 +0800 Subject: [PATCH] Handle overlay in ToolbarOverlayToggleButton. --- osu.Game/Overlays/Toolbar/ToolbarChatButton.cs | 1 - osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs | 1 - osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs | 1 - osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs | 1 + osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs | 1 - 5 files changed, 1 insertion(+), 4 deletions(-) diff --git a/osu.Game/Overlays/Toolbar/ToolbarChatButton.cs b/osu.Game/Overlays/Toolbar/ToolbarChatButton.cs index ca612662e1..39909b8d5b 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarChatButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarChatButton.cs @@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Toolbar private void load(ChatOverlay chat) { StateContainer = chat; - Action = chat.ToggleVisibility; } } } \ No newline at end of file diff --git a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs index 725af09ee7..82599b9a0d 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs @@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Toolbar private void load(MusicController music) { StateContainer = music; - Action = music.ToggleVisibility; } } } \ No newline at end of file diff --git a/osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs b/osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs index 4da87a0568..5126f6a2a4 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs @@ -22,7 +22,6 @@ namespace osu.Game.Overlays.Toolbar private void load(NotificationManager notificationManager) { StateContainer = notificationManager; - Action = notificationManager.ToggleVisibility; } } } \ No newline at end of file diff --git a/osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs b/osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs index 023d9cfea7..fa668bad60 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs @@ -21,6 +21,7 @@ namespace osu.Game.Overlays.Toolbar set { stateContainer = value; + Action = stateContainer.ToggleVisibility; stateContainer.StateChanged += stateChanged; } } diff --git a/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs b/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs index 9f8170b604..ae54b98aca 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs @@ -19,7 +19,6 @@ namespace osu.Game.Overlays.Toolbar private void load(OptionsOverlay options) { StateContainer = options; - Action = options.ToggleVisibility; } } } \ No newline at end of file