1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 11:53:21 +08:00

Esc at the end of play should push to result screen

Closes #3060
This commit is contained in:
phosphene47 2018-07-28 08:34:51 +10:00
parent 5b18488174
commit d32a3ff052

View File

@ -278,6 +278,8 @@ namespace osu.Game.Screens.Play
ScoreProcessor.PopulateScore(score);
score.User = RulesetContainer.Replay?.User ?? api.LocalUser.Value;
Push(new Results(score));
onCompletionEvent = null;
});
}
}
@ -340,6 +342,14 @@ namespace osu.Game.Screens.Play
protected override bool OnExiting(Screen next)
{
if (onCompletionEvent != null)
{
// Proceed to result screen if beatmap already finished playing
onCompletionEvent.RunTask();
return true;
}
if ((!AllowPause || HasFailed || !ValidForResume || pauseContainer?.IsPaused != false || RulesetContainer?.HasReplayLoaded != false) && (!pauseContainer?.IsResuming ?? true))
{
// In the case of replays, we may have changed the playback rate.