Put user dim logic in yet another container inside UserDimContainer

This commit is contained in:
David Zhao
2019-02-22 20:34:51 +09:00
parent a4162a69fb
commit 76de39a344
3 changed files with 47 additions and 27 deletions

View File

@ -18,6 +18,7 @@ namespace osu.Game.Screens.Backgrounds
public Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
protected UserDimContainer FadeContainer;
protected virtual UserDimContainer CreateFadeContainer() => new UserDimContainer { RelativeSizeAxes = Axes.Both };
public virtual WorkingBeatmap Beatmap
{
@ -29,7 +30,7 @@ namespace osu.Game.Screens.Backgrounds
beatmap = value;
FadeContainer = new UserDimContainer { RelativeSizeAxes = Axes.Both };
FadeContainer = CreateFadeContainer();
InternalChild = FadeContainer;
EnableUserDim.BindTo(FadeContainer.EnableUserDim);