diff options
author | tpart <tpart120@proton.me> | 2024-06-26 16:08:38 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-06-26 16:08:40 +0200 |
commit | 69bc0630667f285708ddbb74af8ef83f7a41fc23 (patch) | |
tree | de28fd0ca4404d75c9505a25a2d9f484e4fd61e2 /client/global.gd | |
parent | c4b0f8d698b574c711b1e205371adfd3e3339487 (diff) | |
download | hurrycurry-69bc0630667f285708ddbb74af8ef83f7a41fc23.tar hurrycurry-69bc0630667f285708ddbb74af8ef83f7a41fc23.tar.bz2 hurrycurry-69bc0630667f285708ddbb74af8ef83f7a41fc23.tar.zst |
Rewrite settings system; Add full controller support to settings; Add menu manager system
Diffstat (limited to 'client/global.gd')
-rw-r--r-- | client/global.gd | 10 |
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 |