From 6135db6bd720eaa92be7204a6dc57dc138100c89 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Thu, 2 Feb 2023 23:43:08 -0800 Subject: [PATCH] Revert moving hover sounds to content container --- osu.Game/Graphics/Containers/OsuClickableContainer.cs | 7 +++++-- osu.Game/Graphics/UserInterface/OsuButton.cs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/Containers/OsuClickableContainer.cs b/osu.Game/Graphics/Containers/OsuClickableContainer.cs index ce50dbdc39..6fe1de2216 100644 --- a/osu.Game/Graphics/Containers/OsuClickableContainer.cs +++ b/osu.Game/Graphics/Containers/OsuClickableContainer.cs @@ -44,8 +44,11 @@ namespace osu.Game.Graphics.Containers content.AutoSizeAxes = AutoSizeAxes; } - AddInternal(content); - Add(CreateHoverSounds(sampleSet)); + AddRangeInternal(new Drawable[] + { + content, + CreateHoverSounds(sampleSet) + }); } protected override void ClearInternal(bool disposeChildren = true) => diff --git a/osu.Game/Graphics/UserInterface/OsuButton.cs b/osu.Game/Graphics/UserInterface/OsuButton.cs index 805dfcaa95..6467ae5783 100644 --- a/osu.Game/Graphics/UserInterface/OsuButton.cs +++ b/osu.Game/Graphics/UserInterface/OsuButton.cs @@ -116,7 +116,7 @@ namespace osu.Game.Graphics.UserInterface }); if (hoverSounds.HasValue) - Add(new HoverClickSounds(hoverSounds.Value) { Enabled = { BindTarget = Enabled } }); + AddInternal(new HoverClickSounds(hoverSounds.Value) { Enabled = { BindTarget = Enabled } }); } [BackgroundDependencyLoader]