mirror of https://github.com/ppy/osu
Fix visual settings checkboxes playing sounds in bindable binding
Move sound binding to much later in the process to avoid programmatic checkbox changes triggering interaction sounds
This commit is contained in:
parent
998acc5150
commit
cafa605b90
|
@ -76,6 +76,16 @@ public OsuCheckbox()
|
|||
|
||||
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 @@ public OsuCheckbox()
|
|||
else
|
||||
sampleUnchecked?.Play();
|
||||
};
|
||||
|
||||
Current.DisabledChanged += disabled =>
|
||||
{
|
||||
Alpha = disabled ? 0.3f : 1;
|
||||
};
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
|
|
Loading…
Reference in New Issue