From 3e5df953a29c61fa93665d3bcd4f3303bc091fa6 Mon Sep 17 00:00:00 2001 From: tpart Date: Sat, 24 Aug 2024 19:00:29 +0200 Subject: Fix: Do not open chat if submenu is open or input is disabled (#79) --- client/player/controllable_player.gd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client') diff --git a/client/player/controllable_player.gd b/client/player/controllable_player.gd index b05b2103..e0e8909b 100644 --- a/client/player/controllable_player.gd +++ b/client/player/controllable_player.gd @@ -51,12 +51,14 @@ func _ready(): func _input(_event): if Input.is_action_just_pressed("chat"): - if chat_open: + if chat_open and not game.menu.covered: chat_bubble.stop_edit() - else: + chat_open = false + enable_input = true + elif is_input_enabled(): chat_bubble.edit() - chat_open = !chat_open - enable_input = !enable_input + chat_open = true + enable_input = false const MAX_DT = 1. / 50. func _process(delta): -- cgit v1.2.3-70-g09d2