summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-08-24 19:00:29 +0200
committertpart <tpart120@proton.me>2024-08-24 19:00:29 +0200
commit3e5df953a29c61fa93665d3bcd4f3303bc091fa6 (patch)
treeee515c44cc9c39c3de58841e0381b96109012cc2
parent35ba347f5e59884e9ab0e46f00292c67daf716f0 (diff)
downloadhurrycurry-3e5df953a29c61fa93665d3bcd4f3303bc091fa6.tar
hurrycurry-3e5df953a29c61fa93665d3bcd4f3303bc091fa6.tar.bz2
hurrycurry-3e5df953a29c61fa93665d3bcd4f3303bc091fa6.tar.zst
Fix: Do not open chat if submenu is open or input is disabled (#79)
-rw-r--r--client/player/controllable_player.gd10
1 files changed, 6 insertions, 4 deletions
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):