1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-02 06:49:54 +08:00

Fix discrepancies in how elements of play mode fade when restarting/exiting

This commit is contained in:
Dean Herbert
2018-08-02 19:08:23 +09:00
Unverified
parent 1ed6b23306
commit 7097ecb740
+4 -10
View File
@@ -213,7 +213,7 @@ namespace osu.Game.Screens.Play
{
if (!IsCurrentScreen) return;
pauseContainer.Hide();
fadeOut(true);
Restart();
},
}
@@ -364,16 +364,10 @@ namespace osu.Game.Screens.Play
return true;
}
private void fadeOut()
private void fadeOut(bool instant = false)
{
const float fade_out_duration = 250;
RulesetContainer?.FadeOut(fade_out_duration);
Content.FadeOut(fade_out_duration);
hudOverlay?.ScaleTo(0.7f, fade_out_duration * 3, Easing.In);
Background?.FadeTo(1f, fade_out_duration);
float fadeOutDuration = instant ? 0 : 250;
Content.FadeOut(fadeOutDuration);
}
protected override bool OnScroll(InputState state) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;