mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Schedule unregister instead
This commit is contained in:
parent
3e3843dcf9
commit
b28cfc222b
@ -231,7 +231,7 @@ namespace osu.Game
|
||||
/// <summary>
|
||||
/// Unregisters a blocking <see cref="OverlayContainer"/> that was not created by <see cref="OsuGame"/> itself.
|
||||
/// </summary>
|
||||
private void unregisterBlockingOverlay(OverlayContainer overlayContainer)
|
||||
private void unregisterBlockingOverlay(OverlayContainer overlayContainer) => Schedule(() =>
|
||||
{
|
||||
externalOverlays.Remove(overlayContainer);
|
||||
|
||||
@ -239,7 +239,7 @@ namespace osu.Game
|
||||
focusedOverlays.Remove(focusedOverlayContainer);
|
||||
|
||||
overlayContainer.Expire();
|
||||
}
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
@ -249,7 +249,7 @@ namespace osu.Game
|
||||
/// <param name="hideToolbar">Whether the toolbar should also be hidden.</param>
|
||||
public void CloseAllOverlays(bool hideToolbar = true)
|
||||
{
|
||||
foreach (var overlay in focusedOverlays.ToArray())
|
||||
foreach (var overlay in focusedOverlays)
|
||||
overlay.Hide();
|
||||
|
||||
if (hideToolbar) Toolbar.Hide();
|
||||
|
Loading…
Reference in New Issue
Block a user