1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 10:02:59 +08:00

Revert "Fix alt-f4 being blocked in interface"

This reverts commit 752dd26a4f.
This commit is contained in:
Joehu 2019-10-02 16:08:24 -07:00
parent 148089f160
commit 8017788521

View File

@ -81,8 +81,8 @@ namespace osu.Game.Screens.Menu
{ {
if (holdDelay.Value > 0) if (holdDelay.Value > 0)
confirmAndExit(); confirmAndExit();
else if (!exitConfirmed && dialogOverlay != null && !(dialogOverlay.CurrentDialog is ConfirmExitDialog)) else
dialogOverlay.Push(new ConfirmExitDialog(confirmAndExit, () => exitConfirmOverlay.Abort())); this.Exit();
} }
}); });
} }
@ -253,6 +253,12 @@ namespace osu.Game.Screens.Menu
public override bool OnExiting(IScreen next) public override bool OnExiting(IScreen next)
{ {
if (!exitConfirmed && dialogOverlay != null && !(dialogOverlay.CurrentDialog is ConfirmExitDialog))
{
dialogOverlay.Push(new ConfirmExitDialog(confirmAndExit, () => exitConfirmOverlay.Abort()));
return true;
}
buttons.State = ButtonSystemState.Exit; buttons.State = ButtonSystemState.Exit;
this.FadeOut(3000); this.FadeOut(3000);
return base.OnExiting(next); return base.OnExiting(next);