summaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/global.gd')
-rw-r--r--client/global.gd8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/global.gd b/client/global.gd
index 7c547d64..4d1139d2 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -156,6 +156,14 @@ func focus_first_button(node: Node) -> bool:
return true
return false
+func connect_button_sounds(node: Node):
+ if node is Button:
+ node.pressed.connect(Sound.play_click)
+ if node is Button or node is LineEdit or node is Slider:
+ node.mouse_entered.connect(Sound.play_hover)
+ for c in node.get_children():
+ connect_button_sounds(c)
+
func add_missing_keys(dict: Dictionary, reference: Dictionary):
for k in reference.keys():
if !dict.has(k):