From 80c35801a62a21289aff1053759c4f51dc0c05bc Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 8 Sep 2017 16:15:41 +0900 Subject: [PATCH 1/2] Hide all overlays when home button is pressed --- osu.Game/OsuGame.cs | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index c020675881..b4fbdfb252 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -245,7 +245,11 @@ namespace osu.Game LoadComponentAsync(Toolbar = new Toolbar { Depth = -4, - OnHome = delegate { intro?.ChildScreen?.MakeCurrent(); }, + OnHome = delegate + { + hideAllOverlays(); + intro?.ChildScreen?.MakeCurrent(); + }, }, overlayContent.Add); settings.StateChanged += delegate @@ -310,6 +314,16 @@ namespace osu.Game private OsuScreen currentScreen; private FrameworkConfigManager frameworkConfig; + private void hideAllOverlays() + { + settings.State = Visibility.Hidden; + chat.State = Visibility.Hidden; + direct.State = Visibility.Hidden; + social.State = Visibility.Hidden; + userProfile.State = Visibility.Hidden; + notificationOverlay.State = Visibility.Hidden; + } + private void screenChanged(Screen newScreen) { currentScreen = newScreen as OsuScreen; @@ -323,19 +337,12 @@ namespace osu.Game //central game screen change logic. if (!currentScreen.ShowOverlays) { - settings.State = Visibility.Hidden; - Toolbar.State = Visibility.Hidden; + hideAllOverlays(); musicController.State = Visibility.Hidden; - chat.State = Visibility.Hidden; - direct.State = Visibility.Hidden; - social.State = Visibility.Hidden; - userProfile.State = Visibility.Hidden; - notificationOverlay.State = Visibility.Hidden; + Toolbar.State = Visibility.Hidden; } else - { Toolbar.State = Visibility.Visible; - } ScreenChanged?.Invoke(newScreen); } From 7b497c0ecbc40b9979e6a340c8a9726738f89357 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 8 Sep 2017 23:24:47 +0900 Subject: [PATCH 2/2] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 5f2d5a57e5..4e7ea6af4f 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 5f2d5a57e5d506d7e5d87eeeb442adf10be061f6 +Subproject commit 4e7ea6af4f59f21f6afc522fb063c05417e1a5fe