1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 16:27:26 +08:00

Fix alt-f4 being blocked in interface

This commit is contained in:
Joehu 2019-10-02 11:17:43 -07:00
parent a69b9f1148
commit 752dd26a4f

View File

@ -81,8 +81,8 @@ namespace osu.Game.Screens.Menu
{
if (holdDelay.Value > 0)
confirmAndExit();
else
this.Exit();
else if (!exitConfirmed && dialogOverlay != null && !(dialogOverlay.CurrentDialog is ConfirmExitDialog))
dialogOverlay.Push(new ConfirmExitDialog(confirmAndExit, () => exitConfirmOverlay.Abort()));
}
});
}
@ -253,12 +253,6 @@ namespace osu.Game.Screens.Menu
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;
this.FadeOut(3000);
return base.OnExiting(next);