mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Mod panel don't play sound when hidden
This commit is contained in:
parent
036479dd9d
commit
7697dbe4b3
@ -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);
|
||||
}
|
||||
|
@ -193,6 +193,9 @@ namespace osu.Game.Overlays.Mods
|
||||
if (samplePlaybackDisabled.Value)
|
||||
return;
|
||||
|
||||
if (!IsPresent)
|
||||
return;
|
||||
|
||||
if (Active.Value)
|
||||
sampleOn?.Play();
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user