mirror of
https://github.com/ppy/osu
synced 2025-02-04 04:11:54 +00:00
Fix toolbar hiding when clicking home button
This commit is contained in:
parent
7e4ad7d7cf
commit
a773a22726
@ -160,7 +160,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
private readonly string[] args;
|
private readonly string[] args;
|
||||||
|
|
||||||
private readonly List<OverlayContainer> overlays = new List<OverlayContainer>();
|
private readonly List<OsuFocusedOverlayContainer> focusedOverlays = new List<OsuFocusedOverlayContainer>();
|
||||||
|
|
||||||
private readonly List<OverlayContainer> visibleBlockingOverlays = new List<OverlayContainer>();
|
private readonly List<OverlayContainer> visibleBlockingOverlays = new List<OverlayContainer>();
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ namespace osu.Game
|
|||||||
/// <param name="hideToolbar">Whether the toolbar should also be hidden.</param>
|
/// <param name="hideToolbar">Whether the toolbar should also be hidden.</param>
|
||||||
public void CloseAllOverlays(bool hideToolbar = true)
|
public void CloseAllOverlays(bool hideToolbar = true)
|
||||||
{
|
{
|
||||||
foreach (var overlay in overlays)
|
foreach (var overlay in focusedOverlays)
|
||||||
overlay.Hide();
|
overlay.Hide();
|
||||||
|
|
||||||
if (hideToolbar) Toolbar.Hide();
|
if (hideToolbar) Toolbar.Hide();
|
||||||
@ -910,8 +910,8 @@ namespace osu.Game
|
|||||||
if (cache)
|
if (cache)
|
||||||
dependencies.CacheAs(component);
|
dependencies.CacheAs(component);
|
||||||
|
|
||||||
if (component is OverlayContainer overlay)
|
if (component is OsuFocusedOverlayContainer overlay)
|
||||||
overlays.Add(overlay);
|
focusedOverlays.Add(overlay);
|
||||||
|
|
||||||
// schedule is here to ensure that all component loads are done after LoadComplete is run (and thus all dependencies are cached).
|
// schedule is here to ensure that all component loads are done after LoadComplete is run (and thus all dependencies are cached).
|
||||||
// with some better organisation of LoadComplete to do construction and dependency caching in one step, followed by calls to loadComponentSingleFile,
|
// with some better organisation of LoadComplete to do construction and dependency caching in one step, followed by calls to loadComponentSingleFile,
|
||||||
|
Loading…
Reference in New Issue
Block a user