diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 96ae4c7872..467332dbb9 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -347,7 +347,7 @@ namespace osu.Game.Screens.Play var beatmap = Beatmap.Value; - storyboard = beatmap.Storyboard.CreateDrawable(Beatmap.Value); + storyboard = beatmap.Storyboard.CreateDrawable(); storyboard.Masking = true; if (asyncLoad) @@ -369,10 +369,11 @@ namespace osu.Game.Screens.Play var storyboardVisible = ShowStoryboard && beatmap.Storyboard.HasDrawable; storyboardContainer? - .FadeColour(OsuColour.Gray(Opacity), Duration, Easing.OutQuint) - .FadeTo(storyboardVisible && Opacity > 0 ? 1 : 0, Duration, Easing.OutQuint); + .FadeColour(OsuColour.Gray(BackgroundOpacity), BACKGROUND_FADE_DURATION, Easing.OutQuint) + .FadeTo(storyboardVisible && BackgroundOpacity > 0 ? 1 : 0, BACKGROUND_FADE_DURATION, Easing.OutQuint); - Background?.FadeTo(!storyboardVisible || beatmap.Background == null ? Opacity : 0, Duration, Easing.OutQuint); + if (storyboardVisible && beatmap.Storyboard.ReplacesBackground) + Background?.FadeTo(0, BACKGROUND_FADE_DURATION, Easing.OutQuint); } } } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index fa5ed6365f..042b4fc744 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -263,13 +263,5 @@ namespace osu.Game.Screens.Play }; } } - - protected override void UpdateBackgroundElements() - { - if (!IsCurrentScreen) return; - - base.UpdateBackgroundElements(); - Background?.FadeTo(Opacity, Duration, Easing.OutQuint); - } } } diff --git a/osu.Game/Screens/Play/ScreenWithBeatmapBackground.cs b/osu.Game/Screens/Play/ScreenWithBeatmapBackground.cs index 83346d677c..d83f7e087d 100644 --- a/osu.Game/Screens/Play/ScreenWithBeatmapBackground.cs +++ b/osu.Game/Screens/Play/ScreenWithBeatmapBackground.cs @@ -13,10 +13,12 @@ namespace osu.Game.Screens.Play public abstract class ScreenWithBeatmapBackground : OsuScreen { protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap); + public override bool AllowBeatmapRulesetChange => false; - protected float Duration => 800; - protected float Opacity => 1 - (float)DimLevel; + protected const float BACKGROUND_FADE_DURATION = 800; + + protected float BackgroundOpacity => 1 - (float)DimLevel; #region User Settings @@ -52,7 +54,8 @@ namespace osu.Game.Screens.Play { if (!IsCurrentScreen) return; - (Background as BackgroundScreenBeatmap)?.BlurTo(new Vector2((float)BlurLevel.Value * 25), Duration, Easing.OutQuint); + Background?.FadeTo(BackgroundOpacity, BACKGROUND_FADE_DURATION, Easing.OutQuint); + (Background as BackgroundScreenBeatmap)?.BlurTo(new Vector2((float)BlurLevel.Value * 25), BACKGROUND_FADE_DURATION, Easing.OutQuint); } } }