mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Unify disable logic.
This commit is contained in:
@ -24,11 +24,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
bindable = value;
|
bindable = value;
|
||||||
|
|
||||||
if (bindable != null)
|
|
||||||
Current = bindable;
|
Current = bindable;
|
||||||
|
if (value?.Disabled ?? true)
|
||||||
if (bindable?.Disabled ?? true)
|
|
||||||
Alpha = 0.3f;
|
Alpha = 0.3f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
{
|
{
|
||||||
bindable = value;
|
bindable = value;
|
||||||
dropdown.Current = bindable;
|
dropdown.Current = bindable;
|
||||||
if (bindable.Disabled)
|
if (value?.Disabled ?? true)
|
||||||
Alpha = 0.3f;
|
Alpha = 0.3f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,14 @@ namespace osu.Game.Overlays.Options
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Bindable<T> bindable;
|
||||||
|
|
||||||
public Bindable<T> Bindable
|
public Bindable<T> Bindable
|
||||||
{
|
{
|
||||||
get { return slider.Current; }
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
slider.Current = value;
|
bindable = value;
|
||||||
|
slider.Current = bindable;
|
||||||
if (value?.Disabled ?? true)
|
if (value?.Disabled ?? true)
|
||||||
Alpha = 0.3f;
|
Alpha = 0.3f;
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,8 @@ namespace osu.Game.Overlays.Options
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
bindable = value;
|
bindable = value;
|
||||||
|
|
||||||
Current = bindable;
|
Current = bindable;
|
||||||
|
if (value?.Disabled ?? true)
|
||||||
if (bindable?.Disabled ?? true)
|
|
||||||
Alpha = 0.3f;
|
Alpha = 0.3f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user