diff options
| author | tpart <tpart120@proton.me> | 2024-06-29 22:08:39 +0200 | 
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2024-06-29 22:08:41 +0200 | 
| commit | 9a76089edbae93c874b24c53a9b79f1fe10ebe2f (patch) | |
| tree | 76f003962c2f1c1219c88e6ab02bf7c53a389afb /client/global.gd | |
| parent | 424b4ef3716e74bcc54c3eefffe6ba7994d79270 (diff) | |
| download | hurrycurry-9a76089edbae93c874b24c53a9b79f1fe10ebe2f.tar hurrycurry-9a76089edbae93c874b24c53a9b79f1fe10ebe2f.tar.bz2 hurrycurry-9a76089edbae93c874b24c53a9b79f1fe10ebe2f.tar.zst | |
Add Sound singleton; Restructure sound system; Add button sounds to ingame menu
Diffstat (limited to 'client/global.gd')
| -rw-r--r-- | client/global.gd | 8 | 
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): | 
