mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 17:43:21 +08:00
Make OsuButtons visually disable when not enabled
This commit is contained in:
parent
bd79a69e2e
commit
6a36fa7809
@ -68,6 +68,14 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
sampleClick = audio.Sample.Get(@"UI/generic-click");
|
sampleClick = audio.Sample.Get(@"UI/generic-click");
|
||||||
sampleHover = audio.Sample.Get(@"UI/generic-hover");
|
sampleHover = audio.Sample.Get(@"UI/generic-hover");
|
||||||
|
|
||||||
|
Enabled.ValueChanged += enabled_ValueChanged;
|
||||||
|
Enabled.TriggerChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void enabled_ValueChanged(bool enabled)
|
||||||
|
{
|
||||||
|
this.FadeColour(enabled ? Color4.White : Color4.Gray, 200, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
protected override bool OnClick(InputState state)
|
||||||
|
Loading…
Reference in New Issue
Block a user