1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Mod panel don't play sound when hidden

This commit is contained in:
Cootz 2023-06-09 16:55:19 +03:00
parent 036479dd9d
commit 7697dbe4b3
2 changed files with 5 additions and 2 deletions

View File

@ -212,8 +212,8 @@ namespace osu.Game.Overlays.Mods
foreach (var button in availableMods.Where(b => b.Active.Value))
{
if (Alpha == 0f)
button.Active.Value = false; //If column is hidden change state manually without any animation
if (!button.Visible)
button.Active.Value = false; //If mod panel is hidden change state manually without any animation
else
pendingSelectionOperations.Enqueue(() => button.Active.Value = false);
}

View File

@ -193,6 +193,9 @@ namespace osu.Game.Overlays.Mods
if (samplePlaybackDisabled.Value)
return;
if (!IsPresent)
return;
if (Active.Value)
sampleOn?.Play();
else