From 3fba81cbec98930188bba50072b62384333d30a5 Mon Sep 17 00:00:00 2001 From: TechnikTil <89487150+TechnikTil@users.noreply.github.com> Date: Fri, 29 Nov 2024 08:13:00 -0700 Subject: [PATCH] volume keys are disabled when typing (#82) --- source/online/objects/ChatBox.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/online/objects/ChatBox.hx b/source/online/objects/ChatBox.hx index d8b332aa..38920892 100644 --- a/source/online/objects/ChatBox.hx +++ b/source/online/objects/ChatBox.hx @@ -17,12 +17,14 @@ class ChatBox extends FlxTypedSpriteGroup { typeTextHint.text = "(Type something to input the message, ACCEPT to send)"; typeBg.colorTransform.alphaOffset = 0; typeBg.scale.x = FlxG.width; + ClientPrefs.toggleVolumeKeys(false); } else { FlxG.mouse.visible = prevMouseVisibility; typeTextHint.text = "(Press TAB to open chat!)"; typeBg.colorTransform.alphaOffset = -100; typeBg.scale.x = Std.int(bg.width); + ClientPrefs.toggleVolumeKeys(true); } typeBg.updateHitbox(); targetAlpha = v ? 3 : 0; @@ -158,6 +160,9 @@ class ChatBox extends FlxTypedSpriteGroup { lastMessages.push(msg.text); } + if(focused) + ClientPrefs.toggleVolumeKeys(true); + super.destroy(); instance = null;