aboutsummaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/global.gd')
-rw-r--r--client/global.gd10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/global.gd b/client/global.gd
index 095deec8..83517b2d 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -50,3 +50,13 @@ func load_profile():
settings[i] = saved_settings[i]
print("Loaded settings: ", settings)
+
+func focus_first_button(node: Node) -> bool:
+ if node is Button:
+ 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):
+ return true
+ return false