Add correct conditionals to allow exit

This commit is contained in:
Dean Herbert 2019-06-24 18:15:27 +09:00
parent d70248338d
commit fad1ced1b5

View File

@ -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();
}