From 65097fddc154808e06546d53595b3f5fe786e01a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 12 May 2019 22:34:36 +0900 Subject: [PATCH] Hide music controller when exiting via Alt-F4 Closes #4764. --- osu.Game/OsuGame.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 7b2a8184d1..a431802a1d 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -147,12 +147,17 @@ namespace osu.Game /// /// Close all game-wide overlays. /// - /// Whether the toolbar should also be hidden. - public void CloseAllOverlays(bool toolbar = true) + /// Whether the toolbar (and accompanying controls) should also be hidden. + public void CloseAllOverlays(bool hideToolbarElements = true) { foreach (var overlay in overlays) overlay.State = Visibility.Hidden; - if (toolbar) Toolbar.State = Visibility.Hidden; + + if (hideToolbarElements) + { + Toolbar.State = Visibility.Hidden; + musicController.State = Visibility.Hidden; + } } private DependencyContainer dependencies;