From 18de9e51c51c4f5b83e8a11cada9288b6e0af09b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 20 Mar 2019 19:38:53 +0900 Subject: [PATCH] Formatting and naming improvements --- .../Graphics/Containers/UserDimContainer.cs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/osu.Game/Graphics/Containers/UserDimContainer.cs b/osu.Game/Graphics/Containers/UserDimContainer.cs index beb9653b71..c790d6777d 100644 --- a/osu.Game/Graphics/Containers/UserDimContainer.cs +++ b/osu.Game/Graphics/Containers/UserDimContainer.cs @@ -38,9 +38,9 @@ namespace osu.Game.Graphics.Containers /// public readonly Bindable BlurAmount = new Bindable(); - private Bindable dimLevel { get; set; } + private Bindable userDimLevel { get; set; } - private Bindable blurLevel { get; set; } + private Bindable userBlurLevel { get; set; } private Bindable showStoryboard { get; set; } @@ -51,7 +51,7 @@ namespace osu.Game.Graphics.Containers private readonly bool isStoryboard; private Vector2 blurTarget => EnableUserDim.Value - ? new Vector2(BlurAmount.Value + (float)blurLevel.Value * 25) + ? new Vector2(BlurAmount.Value + (float)userBlurLevel.Value * 25) : new Vector2(BlurAmount.Value); private Background background; @@ -77,7 +77,7 @@ namespace osu.Game.Graphics.Containers if (drawable is Background b) { background = b; - b.BlurTo(blurTarget, 0, Easing.OutQuint); + background.BlurTo(blurTarget, 0, Easing.OutQuint); } base.Add(drawable); @@ -86,12 +86,13 @@ namespace osu.Game.Graphics.Containers [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - dimLevel = config.GetBindable(OsuSetting.DimLevel); - blurLevel = config.GetBindable(OsuSetting.BlurLevel); + userDimLevel = config.GetBindable(OsuSetting.DimLevel); + userBlurLevel = config.GetBindable(OsuSetting.BlurLevel); showStoryboard = config.GetBindable(OsuSetting.ShowStoryboard); + EnableUserDim.ValueChanged += _ => updateVisuals(); - dimLevel.ValueChanged += _ => updateVisuals(); - blurLevel.ValueChanged += _ => updateVisuals(); + userDimLevel.ValueChanged += _ => updateVisuals(); + userBlurLevel.ValueChanged += _ => updateVisuals(); showStoryboard.ValueChanged += _ => updateVisuals(); StoryboardReplacesBackground.ValueChanged += _ => updateVisuals(); BlurAmount.ValueChanged += _ => updateVisuals(); @@ -107,7 +108,7 @@ namespace osu.Game.Graphics.Containers { if (isStoryboard) { - DimContainer.FadeTo(!showStoryboard.Value || dimLevel.Value == 1 ? 0 : 1, background_fade_duration, Easing.OutQuint); + DimContainer.FadeTo(!showStoryboard.Value || userDimLevel.Value == 1 ? 0 : 1, background_fade_duration, Easing.OutQuint); } else { @@ -120,7 +121,7 @@ namespace osu.Game.Graphics.Containers background?.BlurTo(blurTarget, background_fade_duration, Easing.OutQuint); } - DimContainer.FadeColour(EnableUserDim.Value ? OsuColour.Gray(1 - (float)dimLevel.Value) : Color4.White, background_fade_duration, Easing.OutQuint); + DimContainer.FadeColour(EnableUserDim.Value ? OsuColour.Gray(1 - (float)userDimLevel.Value) : Color4.White, background_fade_duration, Easing.OutQuint); } } }