Skip to content

Commit

Permalink
volume keys are disabled when typing (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnikTil authored Nov 29, 2024
1 parent 5054b06 commit 3fba81c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/online/objects/ChatBox.hx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ class ChatBox extends FlxTypedSpriteGroup<FlxSprite> {
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;
Expand Down Expand Up @@ -158,6 +160,9 @@ class ChatBox extends FlxTypedSpriteGroup<FlxSprite> {
lastMessages.push(msg.text);
}

if(focused)
ClientPrefs.toggleVolumeKeys(true);

super.destroy();

instance = null;
Expand Down

0 comments on commit 3fba81c

Please sign in to comment.