mirror of
https://github.com/ppy/osu
synced 2025-02-01 19:02:00 +00:00
Add correct conditionals to allow exit
This commit is contained in:
parent
d70248338d
commit
fad1ced1b5
@ -177,6 +177,16 @@ namespace osu.Game.Screens.Play
|
||||
Restart();
|
||||
},
|
||||
},
|
||||
new HotkeyExitOverlay
|
||||
{
|
||||
Action = () =>
|
||||
{
|
||||
if (!this.IsCurrentScreen()) return;
|
||||
|
||||
fadeOut(true);
|
||||
performUserRequestedExit();
|
||||
},
|
||||
},
|
||||
failAnimation = new FailAnimation(DrawableRuleset) { OnComplete = onFailComplete, }
|
||||
};
|
||||
|
||||
@ -245,6 +255,11 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
if (!this.IsCurrentScreen()) return;
|
||||
|
||||
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
|
||||
onCompletionEvent = null;
|
||||
|
||||
ValidForResume = false;
|
||||
|
||||
this.Exit();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user