Fix backgrounds not properly being faded in song select

This commit is contained in:
David Zhao
2019-02-23 14:59:54 +09:00
parent bb01948283
commit f8d18285a8

View File

@ -30,10 +30,6 @@ namespace osu.Game.Screens.Backgrounds
beatmap = value; beatmap = value;
FadeContainer = CreateFadeContainer();
InternalChild = FadeContainer;
EnableUserDim.BindTo(FadeContainer.EnableUserDim);
Schedule(() => Schedule(() =>
{ {
LoadComponentAsync(new BeatmapBackground(beatmap), b => Schedule(() => LoadComponentAsync(new BeatmapBackground(beatmap), b => Schedule(() =>
@ -47,7 +43,7 @@ namespace osu.Game.Screens.Backgrounds
Background.Expire(); Background.Expire();
} }
b.Depth = newDepth; b.Depth = newDepth;
FadeContainer.Child = Background = b; FadeContainer.Add(Background = b);
Background.BlurSigma = BlurTarget; Background.BlurSigma = BlurTarget;
FadeContainer.StoryboardReplacesBackground.BindTo(StoryboardReplacesBackground); FadeContainer.StoryboardReplacesBackground.BindTo(StoryboardReplacesBackground);
})); }));
@ -57,6 +53,9 @@ namespace osu.Game.Screens.Backgrounds
public BackgroundScreenBeatmap(WorkingBeatmap beatmap = null) public BackgroundScreenBeatmap(WorkingBeatmap beatmap = null)
{ {
FadeContainer = CreateFadeContainer();
InternalChild = FadeContainer;
EnableUserDim.BindTo(FadeContainer.EnableUserDim);
Beatmap = beatmap; Beatmap = beatmap;
} }