feat(audio): wire menu click feedback

This commit is contained in:
Josh Creek
2026-09-01 23:19:48 +01:00
parent b883338396
commit 510138eb0a
5 changed files with 28 additions and 0 deletions
+15
View File
@@ -9,6 +9,21 @@ const MAX_INTENSITY := 1.0
var enabled := true
func bind_tree_buttons(root: Node) -> void:
if root == null:
return
for node in root.find_children("*", "BaseButton", true, false):
bind_button(node as BaseButton)
func bind_button(button: BaseButton) -> void:
if button == null:
return
var callback := Callable(self, "play_ui_click")
if not button.pressed.is_connected(callback):
button.pressed.connect(callback)
func play_ui_click() -> void:
_play_tone(880.0, 0.045, 0.10)