1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-27 02:09:54 +08:00

Fix multiple selection filter tab items no longer playing sounds

These tab items are not managed by a `TabControl`, activation events are manually served by the class itself toggling `Active` when clicked.
This commit is contained in:
Salman Ahmed
2024-04-17 02:42:24 +03:00
Unverified
parent 50a21fb727
commit 42892acc1a
2 changed files with 4 additions and 3 deletions
@@ -129,6 +129,7 @@ namespace osu.Game.Overlays.BeatmapListing
{
base.OnClick(e);
Active.Toggle();
SelectSample.Play();
return true;
}
}
@@ -26,7 +26,7 @@ namespace osu.Game.Overlays.BeatmapListing
private OsuSpriteText text;
private Sample selectSample = null!;
protected Sample SelectSample { get; private set; } = null!;
public FilterTabItem(T value)
: base(value)
@@ -49,7 +49,7 @@ namespace osu.Game.Overlays.BeatmapListing
Enabled.Value = true;
selectSample = audio.Samples.Get(@"UI/tabselect-select");
SelectSample = audio.Samples.Get(@"UI/tabselect-select");
}
protected override void LoadComplete()
@@ -77,7 +77,7 @@ namespace osu.Game.Overlays.BeatmapListing
protected override void OnDeactivated() => UpdateState();
protected override void OnActivatedByUser() => selectSample.Play();
protected override void OnActivatedByUser() => SelectSample.Play();
/// <summary>
/// Returns the label text to be used for the supplied <paramref name="value"/>.