aboutsummaryrefslogtreecommitdiff
path: root/client/audio/sound.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/audio/sound.gd')
-rw-r--r--client/audio/sound.gd19
1 files changed, 19 insertions, 0 deletions
diff --git a/client/audio/sound.gd b/client/audio/sound.gd
new file mode 100644
index 00000000..ddb610c5
--- /dev/null
+++ b/client/audio/sound.gd
@@ -0,0 +1,19 @@
+extends Node
+
+@onready var click_sound = $UI/Click
+@onready var hover_sound = $UI/Hover
+
+func play_click():
+ click_sound.play()
+
+func play_hover():
+ hover_sound.play()
+
+func play_hover_maybe(element):
+ if Global.focus_auto_changed:
+ Global.focus_auto_changed = false
+ return
+ if element is Button:
+ if element.is_hovered():
+ return
+ play_hover()