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:
parent
5d29ff29cb
commit
1f41acc5b9
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user