aboutsummaryrefslogtreecommitdiff
path: root/client/menu/menu.gd
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-07-07 15:01:02 +0200
committertpart <tpart120@proton.me>2024-07-07 15:01:07 +0200
commit3b1d36710e253d9604b7197fba54b5840df2e2e6 (patch)
tree6f5a86bcb1137b2c85c577a85c141995d244bd5a /client/menu/menu.gd
parent97bf42bd26ec253c5937be395feda96485ca789b (diff)
downloadhurrycurry-3b1d36710e253d9604b7197fba54b5840df2e2e6.tar
hurrycurry-3b1d36710e253d9604b7197fba54b5840df2e2e6.tar.bz2
hurrycurry-3b1d36710e253d9604b7197fba54b5840df2e2e6.tar.zst
Fix focus in setup menu
Diffstat (limited to 'client/menu/menu.gd')
-rw-r--r--client/menu/menu.gd8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/menu/menu.gd b/client/menu/menu.gd
index c0d0fce6..46dd7351 100644
--- a/client/menu/menu.gd
+++ b/client/menu/menu.gd
@@ -14,7 +14,7 @@ var transition: SceneTransition
var parent_menu: Menu = null
func _ready():
- focus_first_button(self)
+ focus_first(self)
connect_button_sounds(self)
update_parent_menu(self.get_parent())
if support_anim: anim_setup()
@@ -65,14 +65,14 @@ func replace_menu(path: String):
queue_free()
var focus_auto_changed := false
-func focus_first_button(node: Node) -> bool:
+func focus_first(node: Node) -> bool:
focus_auto_changed = true
- if node is Button:
+ if node is Button or node is LineEdit:
node.grab_focus()
print("Node %s (%s) was selected for focus" % [node.name, node])
return true
for c in node.get_children():
- if focus_first_button(c):
+ if focus_first(c):
return true
return false