From aff9ee5312e799229a7453181365a361b3c07851 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 30 Apr 2024 07:54:42 -0400 Subject: [PATCH] volume preference fix --- source/funkin/ui/options/FunkinSoundTray.hx | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/source/funkin/ui/options/FunkinSoundTray.hx b/source/funkin/ui/options/FunkinSoundTray.hx index b8c408508..792e38fc4 100644 --- a/source/funkin/ui/options/FunkinSoundTray.hx +++ b/source/funkin/ui/options/FunkinSoundTray.hx @@ -86,26 +86,26 @@ class FunkinSoundTray extends FlxSoundTray _timer -= (MS / 1000); alphaTarget = 1; } - else if (y > -height) + else if (y >= -height) { lerpYPos = -height - 10; alphaTarget = 0; + } - if (y <= -height) + if (y <= -height) + { + visible = false; + active = false; + + #if FLX_SAVE + // Save sound preferences + if (FlxG.save.isBound) { - visible = false; - active = false; - - #if FLX_SAVE - // Save sound preferences - if (FlxG.save.isBound) - { - FlxG.save.data.mute = FlxG.sound.muted; - FlxG.save.data.volume = FlxG.sound.volume; - FlxG.save.flush(); - } - #end + FlxG.save.data.mute = FlxG.sound.muted; + FlxG.save.data.volume = FlxG.sound.volume; + FlxG.save.flush(); } + #end } }