mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Always schedule popup dialog push
This commit is contained in:
parent
1222123541
commit
c59784c49f
@ -57,12 +57,7 @@ namespace osu.Game.Overlays
|
|||||||
// a DialogOverlay instance has finished loading.
|
// a DialogOverlay instance has finished loading.
|
||||||
CurrentDialog = dialog;
|
CurrentDialog = dialog;
|
||||||
|
|
||||||
if (IsLoaded)
|
Schedule(() =>
|
||||||
Scheduler.Add(pushDialog, false);
|
|
||||||
else
|
|
||||||
Schedule(pushDialog);
|
|
||||||
|
|
||||||
void pushDialog()
|
|
||||||
{
|
{
|
||||||
// if any existing dialog is being displayed, dismiss it before showing a new one.
|
// if any existing dialog is being displayed, dismiss it before showing a new one.
|
||||||
lastDialog?.Hide();
|
lastDialog?.Hide();
|
||||||
@ -71,7 +66,7 @@ namespace osu.Game.Overlays
|
|||||||
dialogContainer.Add(dialog);
|
dialogContainer.Add(dialog);
|
||||||
|
|
||||||
Show();
|
Show();
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsPresent => Scheduler.HasPendingTasks || dialogContainer.Children.Count > 0;
|
public override bool IsPresent => Scheduler.HasPendingTasks || dialogContainer.Children.Count > 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user