mirror of
https://github.com/ppy/osu
synced 2025-03-19 09:34:49 +00:00
Fix SliderBar
disabled value potentially not transferring to hover sounds
This commit is contained in:
parent
a2fdad4afc
commit
0e350f52f5
@ -131,8 +131,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
},
|
||||
hoverClickSounds = new HoverClickSounds()
|
||||
};
|
||||
|
||||
Current.DisabledChanged += disabled => { Alpha = disabled ? 0.3f : 1; };
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
@ -154,7 +152,12 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
base.LoadComplete();
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user