mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 05:52:54 +08:00
Improve transitions when exiting play mode.
This commit is contained in:
parent
54d1afb655
commit
0d4f457265
@ -308,25 +308,24 @@ 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)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (pauseOverlay.State != Visibility.Visible && !canPause) return true;
|
|
||||||
|
|
||||||
if (!IsPaused && sourceClock.IsRunning) // For if the user presses escape quickly when entering the map
|
|
||||||
{
|
{
|
||||||
Pause();
|
//pause screen override logic.
|
||||||
return true;
|
if (pauseOverlay?.State == Visibility.Hidden && !canPause) return true;
|
||||||
}
|
|
||||||
else
|
if (!IsPaused && sourceClock.IsRunning) // For if the user presses escape quickly when entering the map
|
||||||
{
|
{
|
||||||
FadeOut(250);
|
Pause();
|
||||||
Content.ScaleTo(0.7f, 750, EasingTypes.InQuint);
|
return true;
|
||||||
Background?.FadeTo(1f, 200);
|
}
|
||||||
return base.OnExiting(next);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HitRenderer?.FadeOut(60);
|
||||||
|
|
||||||
|
FadeOut(250);
|
||||||
|
Content.ScaleTo(0.7f, 750, EasingTypes.InQuint);
|
||||||
|
Background?.FadeTo(1f, 200);
|
||||||
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Bindable<bool> mouseWheelDisabled;
|
private Bindable<bool> mouseWheelDisabled;
|
||||||
|
Loading…
Reference in New Issue
Block a user