mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Fix SliderBar
disabled value potentially not transferring to hover sounds
This commit is contained in:
@ -131,8 +131,6 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
},
|
},
|
||||||
hoverClickSounds = new HoverClickSounds()
|
hoverClickSounds = new HoverClickSounds()
|
||||||
};
|
};
|
||||||
|
|
||||||
Current.DisabledChanged += disabled => { Alpha = disabled ? 0.3f : 1; };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
@ -154,7 +152,12 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
CurrentNumber.BindValueChanged(current => TooltipText = getTooltipText(current.NewValue), true);
|
CurrentNumber.BindValueChanged(current => TooltipText = getTooltipText(current.NewValue), true);
|
||||||
Current.DisabledChanged += disabled => hoverClickSounds.Enabled.Value = !disabled;
|
|
||||||
|
Current.BindDisabledChanged(disabled =>
|
||||||
|
{
|
||||||
|
Alpha = disabled ? 0.3f : 1;
|
||||||
|
hoverClickSounds.Enabled.Value = !disabled;
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
protected override bool OnHover(HoverEvent e)
|
||||||
|
Reference in New Issue
Block a user