aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-07-07 19:22:14 +0200
committertpart <tpart120@proton.me>2024-07-07 19:22:14 +0200
commit4cbe2e4adc463aae59b3875a35f8b2cddb92dce0 (patch)
treeac7f70f0a75216fbc21afbf3b63bc44d72fe2c41
parent9bc74b3a9e2fef5f9ab278e4d0c4c9c1cc5b1f12 (diff)
downloadhurrycurry-4cbe2e4adc463aae59b3875a35f8b2cddb92dce0.tar
hurrycurry-4cbe2e4adc463aae59b3875a35f8b2cddb92dce0.tar.bz2
hurrycurry-4cbe2e4adc463aae59b3875a35f8b2cddb92dce0.tar.zst
Fix button pressable despite being disabled
-rw-r--r--client/menu/controller_buttons/controller_button.gd2
-rw-r--r--client/menu/lobby.gd4
2 files changed, 4 insertions, 2 deletions
diff --git a/client/menu/controller_buttons/controller_button.gd b/client/menu/controller_buttons/controller_button.gd
index 4fa70b5a..83cfc180 100644
--- a/client/menu/controller_buttons/controller_button.gd
+++ b/client/menu/controller_buttons/controller_button.gd
@@ -29,6 +29,8 @@ func _input(event):
return
if not is_visible_in_tree():
return
+ if disabled:
+ return
if Input.is_action_just_pressed(press_action):
pressed.emit()
diff --git a/client/menu/lobby.gd b/client/menu/lobby.gd
index e96e11c4..a06b244a 100644
--- a/client/menu/lobby.gd
+++ b/client/menu/lobby.gd
@@ -58,9 +58,9 @@ func _input(event):
if not visible:
return
- if Input.is_action_just_pressed("previous"):
+ if Input.is_action_just_pressed("previous") and not prev_map.disabled:
prev_map.emit_signal("pressed")
- elif Input.is_action_just_pressed("next"):
+ elif Input.is_action_just_pressed("next") and not next_map.disabled:
next_map.emit_signal("pressed")
func _on_left_pressed():