diff options
Diffstat (limited to 'client/menu/menu.gd')
-rw-r--r-- | client/menu/menu.gd | 8 |
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 |