1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 07:32:55 +08:00

Integrate auto click into exit confirmed check

This commit is contained in:
mcendu 2019-12-22 21:20:55 +08:00
parent 5d29ff29cb
commit 1f41acc5b9

View File

@ -247,14 +247,14 @@ namespace osu.Game.Screens.Menu
public override bool OnExiting(IScreen next)
{
if (!exitConfirmed && dialogOverlay != null && !(dialogOverlay.CurrentDialog is ConfirmExitDialog))
if (!exitConfirmed && dialogOverlay != null)
{
if (!(dialogOverlay.CurrentDialog is ConfirmExitDialog))
{
dialogOverlay.Push(new ConfirmExitDialog(confirmAndExit, () => exitConfirmOverlay.Abort()));
return true;
}
if (dialogOverlay.CurrentDialog is ConfirmExitDialog)
{
exitConfirmed = true;
dialogOverlay.CurrentDialog.Buttons.First().Click();
}