Remove leftover usage of dimlevel in BackgroundScreenBeatmap

This commit is contained in:
David Zhao 2019-02-22 18:01:50 +09:00
parent 6bf831b96f
commit a4162a69fb
2 changed files with 9 additions and 9 deletions

View File

@ -301,9 +301,17 @@ public DimAccessiblePlayerLoader(Player player) : base(() => player)
private class FadeAccessibleBackground : BackgroundScreenBeatmap
{
private Bindable<float> dimLevel;
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
dimLevel = config.GetBindable<float>(OsuSetting.DimLevel);
}
public bool AssertDimmed()
{
return FadeContainer.Colour == OsuColour.Gray(1 - (float)DimLevel);
return FadeContainer.Colour == OsuColour.Gray(1 - dimLevel);
}
public bool AssertUndimmed()

View File

@ -6,7 +6,6 @@
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<double> DimLevel = new Bindable<double>();
public Bindable<bool> EnableUserDim = new Bindable<bool>();
public Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
protected UserDimContainer FadeContainer;
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
config.BindWith(OsuSetting.DimLevel, DimLevel);
}
public virtual WorkingBeatmap Beatmap
{
get { return beatmap; }