Fix tournament buttons playing sound effects

This commit is contained in:
Dean Herbert
2019-11-08 17:00:47 +09:00
parent 6805c029e7
commit 8bcbc93501
9 changed files with 45 additions and 33 deletions

View File

@ -48,7 +48,7 @@ namespace osu.Game.Graphics.UserInterface
protected Box Background;
protected SpriteText SpriteText;
public OsuButton()
public OsuButton(HoverSampleSet? hoverSounds = HoverSampleSet.Loud)
{
Height = 40;
@ -78,10 +78,12 @@ namespace osu.Game.Graphics.UserInterface
Depth = float.MinValue
},
SpriteText = CreateText(),
new HoverClickSounds(HoverSampleSet.Loud),
}
});
if (hoverSounds.HasValue)
AddInternal(new HoverClickSounds(hoverSounds.Value));
Enabled.BindValueChanged(enabledChanged, true);
}