diff --git a/osu.Game.Tests/Visual/Background/TestSceneBackgroundScreenBeatmap.cs b/osu.Game.Tests/Visual/Background/TestSceneBackgroundScreenBeatmap.cs index 0d62bf9bdc..f0e50f8498 100644 --- a/osu.Game.Tests/Visual/Background/TestSceneBackgroundScreenBeatmap.cs +++ b/osu.Game.Tests/Visual/Background/TestSceneBackgroundScreenBeatmap.cs @@ -334,15 +334,7 @@ namespace osu.Game.Tests.Visual.Background { protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground(Beatmap.Value); - protected override StoryboardContainer CreateStoryboardContainer(Storyboard storyboard) - { - return new TestStoryboardContainer - { - RelativeSizeAxes = Axes.Both, - Alpha = 1, - EnableUserDim = { Value = true } - }; - } + protected override StoryboardContainer CreateStoryboardContainer(Storyboard storyboard) => new TestStoryboardContainer { RelativeSizeAxes = Axes.Both }; public TestStoryboardContainer CurrentStoryboardContainer => (TestStoryboardContainer)StoryboardContainer; diff --git a/osu.Game/Graphics/Containers/StoryboardContainer.cs b/osu.Game/Graphics/Containers/StoryboardContainer.cs index 472e22e212..899cbe1f0d 100644 --- a/osu.Game/Graphics/Containers/StoryboardContainer.cs +++ b/osu.Game/Graphics/Containers/StoryboardContainer.cs @@ -19,6 +19,8 @@ namespace osu.Game.Graphics.Containers public StoryboardContainer(Storyboard storyboard) { this.storyboard = storyboard; + EnableUserDim.Default = true; + EnableUserDim.Value = true; } [BackgroundDependencyLoader] @@ -29,13 +31,12 @@ namespace osu.Game.Graphics.Containers protected override void LoadComplete() { - ShowStoryboard.ValueChanged += _ => initializeStoryboard(true); + ShowStoryboard.BindValueChanged(_ => initializeStoryboard(true), true); base.LoadComplete(); } protected override void ApplyFade() { - // Storyboards cannot be blurred, so just hide the storyboard if it gets toggled. DimContainer.FadeTo(!ShowStoryboard.Value || UserDimLevel.Value == 1 ? 0 : 1, BACKGROUND_FADE_DURATION, Easing.OutQuint); } diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 663113f747..f44cb069a9 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -78,12 +78,7 @@ namespace osu.Game.Screens.Play protected StoryboardContainer StoryboardContainer { get; private set; } - protected virtual StoryboardContainer CreateStoryboardContainer(Storyboard storyboard) => new StoryboardContainer(storyboard) - { - RelativeSizeAxes = Axes.Both, - Alpha = 1, - EnableUserDim = { Value = true } - }; + protected virtual StoryboardContainer CreateStoryboardContainer(Storyboard storyboard) => new StoryboardContainer(storyboard) { RelativeSizeAxes = Axes.Both }; [Cached] [Cached(Type = typeof(IBindable>))]