From d32a3ff0524696cf274edb1649632e08340cce64 Mon Sep 17 00:00:00 2001 From: phosphene47 Date: Sat, 28 Jul 2018 08:34:51 +1000 Subject: [PATCH 1/2] Esc at the end of play should push to result screen Closes #3060 --- osu.Game/Screens/Play/Player.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 00ba1a8d12..438e5a49e0 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -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. From 8c3583ac54a9e98f48ff4fb073635410002883a7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 30 Jul 2018 14:55:03 +0900 Subject: [PATCH 2/2] Remove newline --- osu.Game/Screens/Play/Player.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 438e5a49e0..cc649960ea 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -346,7 +346,6 @@ namespace osu.Game.Screens.Play { // Proceed to result screen if beatmap already finished playing onCompletionEvent.RunTask(); - return true; }