diff --git a/osu.Game/Graphics/Containers/UserDimContainer.cs b/osu.Game/Graphics/Containers/UserDimContainer.cs index 6e3b9c0d79..25a81b011d 100644 --- a/osu.Game/Graphics/Containers/UserDimContainer.cs +++ b/osu.Game/Graphics/Containers/UserDimContainer.cs @@ -16,9 +16,9 @@ namespace osu.Game.Graphics.Containers /// public class UserDimContainer : Container { - protected Bindable DimLevel; + protected Bindable DimLevel { get; private set; } - protected Bindable ShowStoryboard; + protected Bindable ShowStoryboard { get; private set; } /// /// Whether or not user-configured dim levels should be applied to the container. @@ -28,9 +28,9 @@ public class UserDimContainer : Container /// /// Whether or not the storyboard loaded should completely hide the background behind it. /// - public Bindable StoryboardReplacesBackground = new Bindable(); + public readonly Bindable StoryboardReplacesBackground = new Bindable(); - protected Container DimContainer; + protected Container DimContainer { get; private set; } protected override Container Content => DimContainer; @@ -39,6 +39,7 @@ public class UserDimContainer : Container private const float background_fade_duration = 800; /// + /// Creates a new . /// /// /// Whether or not this instance of UserDimContainer contains a storyboard. diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs index 9fb452e15d..9333685e6c 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs @@ -18,11 +18,11 @@ public class BackgroundScreenBeatmap : BlurrableBackgroundScreen /// /// Whether or not user dim settings should be applied to this Background. /// - public Bindable EnableUserDim = new Bindable(); + public readonly Bindable EnableUserDim = new Bindable(); - public Bindable StoryboardReplacesBackground = new Bindable(); + public readonly Bindable StoryboardReplacesBackground = new Bindable(); - protected UserDimContainer FadeContainer; + protected UserDimContainer FadeContainer { get; private set; } protected virtual UserDimContainer CreateFadeContainer() => new UserDimContainer { RelativeSizeAxes = Axes.Both }; diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 2f5d776244..2880013b32 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -87,7 +87,7 @@ public class Player : ScreenWithBeatmapBackground, IProvideCursor 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 @@ public override void OnEntering(IScreen last) 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(() =>