Implemented new interface which allows parent containers to decide on whether a "OnHover" sound should be played.

This commit is contained in:
FreezyLemon
2017-12-07 13:12:36 +01:00
parent f4f1291919
commit a8599a1b75
2 changed files with 10 additions and 2 deletions

View File

@ -8,7 +8,7 @@ using osu.Game.Graphics.UserInterface;
namespace osu.Game.Graphics.Containers
{
public class OsuClickableContainer : ClickableContainer
public class OsuClickableContainer : ClickableContainer, IHasHoverSounds
{
private readonly HoverSampleSet sampleSet;
@ -16,6 +16,8 @@ namespace osu.Game.Graphics.Containers
protected override Container<Drawable> Content => content;
public bool ShouldPlayHoverSound => true;
public OsuClickableContainer(HoverSampleSet sampleSet = HoverSampleSet.Normal)
{
this.sampleSet = sampleSet;