From c7238fcfd114352924a6cca436e069523a86cced Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Sun, 22 Sep 2024 00:45:30 -0400 Subject: [PATCH] Stop the volume tray from hiding as long as the game is muted --- source/funkin/ui/options/FunkinSoundTray.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/funkin/ui/options/FunkinSoundTray.hx b/source/funkin/ui/options/FunkinSoundTray.hx index eea30ae17..b2fb7fc04 100644 --- a/source/funkin/ui/options/FunkinSoundTray.hx +++ b/source/funkin/ui/options/FunkinSoundTray.hx @@ -79,10 +79,12 @@ class FunkinSoundTray extends FlxSoundTray y = MathUtil.coolLerp(y, lerpYPos, 0.1); alpha = MathUtil.coolLerp(alpha, alphaTarget, 0.25); + var shouldHide = (FlxG.sound.muted == false && FlxG.sound.volume > 0); + // Animate sound tray thing if (_timer > 0) { - _timer -= (MS / 1000); + if (shouldHide) _timer -= (MS / 1000); alphaTarget = 1; } else if (y >= -height)