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 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); }