aboutsummaryrefslogtreecommitdiff
path: root/client/menu/menu.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-07 19:09:01 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-07 19:09:01 +0200
commitfaf2c3c45f4a27769662c923f34672e7dfd7254d (patch)
tree967fa1a739ebd42099fbad1f5a6f9ef1aa778937 /client/menu/menu.gd
parentb44053da52eb94d755a69eb68a4c2994d07c423f (diff)
parentf0f6af6822b3057f0735adf705bcce4c4548f321 (diff)
downloadhurrycurry-faf2c3c45f4a27769662c923f34672e7dfd7254d.tar
hurrycurry-faf2c3c45f4a27769662c923f34672e7dfd7254d.tar.bz2
hurrycurry-faf2c3c45f4a27769662c923f34672e7dfd7254d.tar.zst
Merge branch 'master' of https://codeberg.org/metamuffin/undercooked
Diffstat (limited to 'client/menu/menu.gd')
-rw-r--r--client/menu/menu.gd4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/menu/menu.gd b/client/menu/menu.gd
index f3f0d2bf..b7d95651 100644
--- a/client/menu/menu.gd
+++ b/client/menu/menu.gd
@@ -90,6 +90,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])
@@ -100,7 +102,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: