1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +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)
{
dialogOverlay.Push(new ConfirmExitDialog(confirmAndExit, () => exitConfirmOverlay.Abort()));
return true;
}
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();
}