1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

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:
Dean Herbert 2018-02-08 14:43:07 +09:00
parent 998acc5150
commit cafa605b90

View File

@ -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)