mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 02:32:55 +08:00
Always hide other overlays, even if the new one is not loaded
This commit is contained in:
parent
a9c4fa442a
commit
bd1e2da1c2
@ -756,12 +756,12 @@ namespace osu.Game
|
||||
|
||||
private void showOverlayAboveOthers(OverlayContainer overlay, OverlayContainer[] otherOverlays)
|
||||
{
|
||||
otherOverlays.Where(o => o != overlay).ForEach(o => o.Hide());
|
||||
|
||||
// generally shouldn't ever hit this state, but protects against a crash on attempting to change ChildDepth.
|
||||
if (overlay.LoadState < LoadState.Ready)
|
||||
return;
|
||||
|
||||
otherOverlays.Where(o => o != overlay).ForEach(o => o.Hide());
|
||||
|
||||
// show above others if not visible at all, else leave at current depth.
|
||||
if (!overlay.IsPresent)
|
||||
overlayContent.ChangeChildDepth(overlay, (float)-Clock.CurrentTime);
|
||||
|
Loading…
Reference in New Issue
Block a user