From f8d18285a8314633dabfdeaf543cfb41caa793e7 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Sat, 23 Feb 2019 14:59:54 +0900 Subject: [PATCH] Fix backgrounds not properly being faded in song select --- osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs index 6533276568..b804a86282 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs @@ -30,10 +30,6 @@ namespace osu.Game.Screens.Backgrounds beatmap = value; - FadeContainer = CreateFadeContainer(); - InternalChild = FadeContainer; - EnableUserDim.BindTo(FadeContainer.EnableUserDim); - Schedule(() => { LoadComponentAsync(new BeatmapBackground(beatmap), b => Schedule(() => @@ -47,7 +43,7 @@ namespace osu.Game.Screens.Backgrounds Background.Expire(); } b.Depth = newDepth; - FadeContainer.Child = Background = b; + FadeContainer.Add(Background = b); Background.BlurSigma = BlurTarget; FadeContainer.StoryboardReplacesBackground.BindTo(StoryboardReplacesBackground); })); @@ -57,6 +53,9 @@ namespace osu.Game.Screens.Backgrounds public BackgroundScreenBeatmap(WorkingBeatmap beatmap = null) { + FadeContainer = CreateFadeContainer(); + InternalChild = FadeContainer; + EnableUserDim.BindTo(FadeContainer.EnableUserDim); Beatmap = beatmap; }