mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 21:07:18 +09:00
Update UI controls to understand DisabledChanged.
This commit is contained in:
parent
2d53ad4c0a
commit
ef7bc0f92e
@ -25,8 +25,6 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
bindable = value;
|
bindable = value;
|
||||||
Current.BindTo(bindable);
|
Current.BindTo(bindable);
|
||||||
if (value?.Disabled ?? true)
|
|
||||||
Alpha = 0.3f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,6 +82,11 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
else
|
else
|
||||||
sampleUnchecked?.Play();
|
sampleUnchecked?.Play();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Current.DisabledChanged += disabled =>
|
||||||
|
{
|
||||||
|
Alpha = disabled ? 0.3f : 1;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
|
@ -74,6 +74,11 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Expanded = true,
|
Expanded = true,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Current.DisabledChanged += disabled =>
|
||||||
|
{
|
||||||
|
Alpha = disabled ? 0.3f : 1;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -33,6 +33,11 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Height = 40;
|
Height = 40;
|
||||||
TextContainer.Height = 0.5f;
|
TextContainer.Height = 0.5f;
|
||||||
CornerRadius = 5;
|
CornerRadius = 5;
|
||||||
|
|
||||||
|
Current.DisabledChanged += disabled =>
|
||||||
|
{
|
||||||
|
Alpha = disabled ? 0.3f : 1;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -34,8 +34,6 @@ namespace osu.Game.Overlays.Options
|
|||||||
{
|
{
|
||||||
bindable = value;
|
bindable = value;
|
||||||
dropdown.Current.BindTo(bindable);
|
dropdown.Current.BindTo(bindable);
|
||||||
if (value?.Disabled ?? true)
|
|
||||||
Alpha = 0.3f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,6 +73,11 @@ namespace osu.Game.Overlays.Options
|
|||||||
Items = Items,
|
Items = Items,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dropdown.Current.DisabledChanged += disabled =>
|
||||||
|
{
|
||||||
|
Alpha = disabled ? 0.3f : 1;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,6 @@ namespace osu.Game.Overlays.Options
|
|||||||
{
|
{
|
||||||
bindable = value;
|
bindable = value;
|
||||||
slider.Current.BindTo(bindable);
|
slider.Current.BindTo(bindable);
|
||||||
if (value?.Disabled ?? true)
|
|
||||||
Alpha = 0.3f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,9 +16,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
{
|
{
|
||||||
bindable = value;
|
bindable = value;
|
||||||
Current.BindTo(bindable);
|
Current.BindTo(bindable);
|
||||||
if (value?.Disabled ?? true)
|
|
||||||
Alpha = 0.3f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user