1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 20:32:55 +08:00

Improve transitions when exiting play mode.

This commit is contained in:
Dean Herbert 2017-04-07 20:46:35 +09:00
parent 54d1afb655
commit 0d4f457265
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -308,26 +308,25 @@ namespace osu.Game.Screens.Play
protected override bool OnExiting(Screen next) protected override bool OnExiting(Screen next)
{ {
if (pauseOverlay == null) return false; if (pauseOverlay != null && !HitRenderer.HasReplayLoaded)
{
if (HitRenderer.HasReplayLoaded) //pause screen override logic.
return false; if (pauseOverlay?.State == Visibility.Hidden && !canPause) return true;
if (pauseOverlay.State != Visibility.Visible && !canPause) return true;
if (!IsPaused && sourceClock.IsRunning) // For if the user presses escape quickly when entering the map if (!IsPaused && sourceClock.IsRunning) // For if the user presses escape quickly when entering the map
{ {
Pause(); Pause();
return true; return true;
} }
else }
{
HitRenderer?.FadeOut(60);
FadeOut(250); FadeOut(250);
Content.ScaleTo(0.7f, 750, EasingTypes.InQuint); Content.ScaleTo(0.7f, 750, EasingTypes.InQuint);
Background?.FadeTo(1f, 200); Background?.FadeTo(1f, 200);
return base.OnExiting(next); return base.OnExiting(next);
} }
}
private Bindable<bool> mouseWheelDisabled; private Bindable<bool> mouseWheelDisabled;