mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Integrate auto click into exit confirmed check
This commit is contained in:
parent
5d29ff29cb
commit
1f41acc5b9
@ -247,14 +247,14 @@ 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))
|
if (!exitConfirmed && dialogOverlay != null)
|
||||||
{
|
{
|
||||||
dialogOverlay.Push(new ConfirmExitDialog(confirmAndExit, () => exitConfirmOverlay.Abort()));
|
if (!(dialogOverlay.CurrentDialog is ConfirmExitDialog))
|
||||||
return true;
|
{
|
||||||
}
|
dialogOverlay.Push(new ConfirmExitDialog(confirmAndExit, () => exitConfirmOverlay.Abort()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (dialogOverlay.CurrentDialog is ConfirmExitDialog)
|
|
||||||
{
|
|
||||||
exitConfirmed = true;
|
exitConfirmed = true;
|
||||||
dialogOverlay.CurrentDialog.Buttons.First().Click();
|
dialogOverlay.CurrentDialog.Buttons.First().Click();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user