1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

Update in line with framework menu handling changes

This commit is contained in:
Dean Herbert 2023-02-22 17:13:55 +09:00
parent 4f9f4b3970
commit 6e48860c79

View File

@ -77,10 +77,12 @@ namespace osu.Game.Graphics.UserInterface
private void updateState()
{
hoverClickSounds.Enabled.Value = !Item.Action.Disabled;
Alpha = Item.Action.Disabled ? 0.2f : 1;
bool enabledState = IsActionable || HasSubmenu;
if (IsHovered && !Item.Action.Disabled)
hoverClickSounds.Enabled.Value = enabledState;
Alpha = enabledState ? 1 : 0.2f;
if (IsHovered && enabledState)
{
text.BoldText.FadeIn(transition_length, Easing.OutQuint);
text.NormalText.FadeOut(transition_length, Easing.OutQuint);