Hide music controller when exiting via Alt-F4

Closes #4764.
This commit is contained in:
Dean Herbert 2019-05-12 22:34:36 +09:00
parent 50c4e788af
commit 65097fddc1

View File

@ -147,12 +147,17 @@ namespace osu.Game
/// <summary>
/// Close all game-wide overlays.
/// </summary>
/// <param name="toolbar">Whether the toolbar should also be hidden.</param>
public void CloseAllOverlays(bool toolbar = true)
/// <param name="hideToolbarElements">Whether the toolbar (and accompanying controls) should also be hidden.</param>
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;