diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index cc649960ea..2e23bb16f0 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -213,7 +213,7 @@ private void load(AudioManager audio, APIAccess api, OsuConfigManager config) { if (!IsCurrentScreen) return; - pauseContainer.Hide(); + fadeOut(true); Restart(); }, } @@ -364,16 +364,10 @@ protected override bool OnExiting(Screen next) 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;