mirror of
https://github.com/ppy/osu
synced 2024-12-16 20:05:41 +00:00
Merge pull request #2037 from peppy/fix-checkbox-sounds
Fix visual settings checkboxes playing sounds in bindable binding
This commit is contained in:
commit
553c9bb2fa
@ -76,6 +76,16 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
Nub.Current.BindTo(Current);
|
||||
|
||||
Current.DisabledChanged += disabled =>
|
||||
{
|
||||
Alpha = disabled ? 0.3f : 1;
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Current.ValueChanged += newValue =>
|
||||
{
|
||||
if (newValue)
|
||||
@ -83,11 +93,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
else
|
||||
sampleUnchecked?.Play();
|
||||
};
|
||||
|
||||
Current.DisabledChanged += disabled =>
|
||||
{
|
||||
Alpha = disabled ? 0.3f : 1;
|
||||
};
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
|
Loading…
Reference in New Issue
Block a user