mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 17:27:48 +08:00
Merge pull request #3164 from peppy/fix-fade-discrepancies
Fix discrepancies in how elements of play mode fade when restarting/e…
This commit is contained in:
commit
78eabce35a
@ -213,7 +213,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
if (!IsCurrentScreen) return;
|
if (!IsCurrentScreen) return;
|
||||||
|
|
||||||
pauseContainer.Hide();
|
fadeOut(true);
|
||||||
Restart();
|
Restart();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -364,16 +364,10 @@ namespace osu.Game.Screens.Play
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fadeOut()
|
private void fadeOut(bool instant = false)
|
||||||
{
|
{
|
||||||
const float fade_out_duration = 250;
|
float fadeOutDuration = instant ? 0 : 250;
|
||||||
|
Content.FadeOut(fadeOutDuration);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnScroll(InputState state) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;
|
protected override bool OnScroll(InputState state) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;
|
||||||
|
Loading…
Reference in New Issue
Block a user