Apply suggestions from code review

Co-Authored-By: nyquillerium <nyquill@ppy.sh>
This commit is contained in:
Dan Balasescu
2019-02-28 18:25:58 +09:00
committed by GitHub
parent b2872b47d0
commit 99812bd448
3 changed files with 10 additions and 9 deletions

View File

@ -18,11 +18,11 @@ namespace osu.Game.Screens.Backgrounds
/// <summary>
/// Whether or not user dim settings should be applied to this Background.
/// </summary>
public Bindable<bool> EnableUserDim = new Bindable<bool>();
public readonly Bindable<bool> EnableUserDim = new Bindable<bool>();
public Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
public readonly Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
protected UserDimContainer FadeContainer;
protected UserDimContainer FadeContainer { get; private set; }
protected virtual UserDimContainer CreateFadeContainer() => new UserDimContainer { RelativeSizeAxes = Axes.Both };

View File

@ -87,7 +87,7 @@ namespace osu.Game.Screens.Play
private FailOverlay failOverlay;
private DrawableStoryboard storyboard;
protected UserDimContainer StoryboardContainer;
protected UserDimContainer StoryboardContainer { get; private set; }
protected virtual UserDimContainer CreateStoryboardContainer() => new UserDimContainer(true)
{
@ -358,7 +358,7 @@ namespace osu.Game.Screens.Play
Background.EnableUserDim.Value = true;
storyboardReplacesBackground.BindTo(Background.StoryboardReplacesBackground);
StoryboardContainer.StoryboardReplacesBackground.BindTo(Background.StoryboardReplacesBackground);
StoryboardContainer.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
storyboardReplacesBackground.Value = Beatmap.Value.Storyboard.ReplacesBackground && Beatmap.Value.Storyboard.HasDrawable;
Task.Run(() =>