diff options
author | tpart <tpart120@proton.me> | 2024-07-07 18:52:49 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-07-07 18:52:54 +0200 |
commit | 44499c6e81dc5cc014f502cf6cb4db0c96081d7e (patch) | |
tree | 7cf07ee27ba517d7d4766677cc367bd1f9a16fbd /client/menu/menu.gd | |
parent | a72f4466c568dd7d7fe6f76a295fdd1162c1d312 (diff) | |
download | hurrycurry-44499c6e81dc5cc014f502cf6cb4db0c96081d7e.tar hurrycurry-44499c6e81dc5cc014f502cf6cb4db0c96081d7e.tar.bz2 hurrycurry-44499c6e81dc5cc014f502cf6cb4db0c96081d7e.tar.zst |
Add lobby menu
Diffstat (limited to 'client/menu/menu.gd')
-rw-r--r-- | client/menu/menu.gd | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/menu/menu.gd b/client/menu/menu.gd index 7ae7f3a0..51f0cf6b 100644 --- a/client/menu/menu.gd +++ b/client/menu/menu.gd @@ -67,6 +67,8 @@ func replace_menu(path: String): var focus_auto_changed := false func focus_first(node: Node) -> bool: focus_auto_changed = true + if node.is_in_group("no_auto_focus"): + return false if node is Button or node is LineEdit: node.grab_focus() print("Node %s (%s) was selected for focus" % [node.name, node]) @@ -77,7 +79,7 @@ func focus_first(node: Node) -> bool: return false func connect_button_sounds(node: Node): - if node is Button: + if node is Button or node is TextureButton: if not node.is_in_group("no_click_sound"): node.pressed.connect(Sound.play_click) if node is Button or node is LineEdit or node is Slider: |