diff --git a/osu.Game.Tests/Visual/TestCaseBackgroundScreenBeatmap.cs b/osu.Game.Tests/Visual/TestCaseBackgroundScreenBeatmap.cs index 9871209760..bbffb910d5 100644 --- a/osu.Game.Tests/Visual/TestCaseBackgroundScreenBeatmap.cs +++ b/osu.Game.Tests/Visual/TestCaseBackgroundScreenBeatmap.cs @@ -301,9 +301,17 @@ namespace osu.Game.Tests.Visual private class FadeAccessibleBackground : BackgroundScreenBeatmap { + private Bindable dimLevel; + + [BackgroundDependencyLoader] + private void load(OsuConfigManager config) + { + dimLevel = config.GetBindable(OsuSetting.DimLevel); + } + public bool AssertDimmed() { - return FadeContainer.Colour == OsuColour.Gray(1 - (float)DimLevel); + return FadeContainer.Colour == OsuColour.Gray(1 - dimLevel); } public bool AssertUndimmed() diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs index c793197f19..8aa3ef620c 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs @@ -6,7 +6,6 @@ using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Textures; using osu.Game.Beatmaps; -using osu.Game.Configuration; using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Containers; @@ -15,18 +14,11 @@ namespace osu.Game.Screens.Backgrounds public class BackgroundScreenBeatmap : BlurrableBackgroundScreen { private WorkingBeatmap beatmap; - protected Bindable DimLevel = new Bindable(); public Bindable EnableUserDim = new Bindable(); public Bindable StoryboardReplacesBackground = new Bindable(); protected UserDimContainer FadeContainer; - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - config.BindWith(OsuSetting.DimLevel, DimLevel); - } - public virtual WorkingBeatmap Beatmap { get { return beatmap; }