diff --git a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs index 5d4760fec6..6dfbc931cf 100644 --- a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs +++ b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs @@ -24,11 +24,8 @@ public Bindable Bindable set { bindable = value; - - if (bindable != null) - Current = bindable; - - if (bindable?.Disabled ?? true) + Current = bindable; + if (value?.Disabled ?? true) Alpha = 0.3f; } } diff --git a/osu.Game/Overlays/Options/OptionDropdown.cs b/osu.Game/Overlays/Options/OptionDropdown.cs index decf5896c2..332c95328b 100644 --- a/osu.Game/Overlays/Options/OptionDropdown.cs +++ b/osu.Game/Overlays/Options/OptionDropdown.cs @@ -34,7 +34,7 @@ public Bindable Bindable { bindable = value; dropdown.Current = bindable; - if (bindable.Disabled) + if (value?.Disabled ?? true) Alpha = 0.3f; } } diff --git a/osu.Game/Overlays/Options/OptionSlider.cs b/osu.Game/Overlays/Options/OptionSlider.cs index 1cd9fdc60c..0b0a9b8b50 100644 --- a/osu.Game/Overlays/Options/OptionSlider.cs +++ b/osu.Game/Overlays/Options/OptionSlider.cs @@ -27,12 +27,14 @@ public string LabelText } } + private Bindable bindable; + public Bindable Bindable { - get { return slider.Current; } set { - slider.Current = value; + bindable = value; + slider.Current = bindable; if (value?.Disabled ?? true) Alpha = 0.3f; } diff --git a/osu.Game/Overlays/Options/OptionTextBox.cs b/osu.Game/Overlays/Options/OptionTextBox.cs index 346c9f88f5..c2c8e91016 100644 --- a/osu.Game/Overlays/Options/OptionTextBox.cs +++ b/osu.Game/Overlays/Options/OptionTextBox.cs @@ -15,10 +15,8 @@ public Bindable Bindable set { bindable = value; - Current = bindable; - - if (bindable?.Disabled ?? true) + if (value?.Disabled ?? true) Alpha = 0.3f; } }