play audio on web on start

This commit is contained in:
2026-11-08 20:52:03 +03:00
parent 5de55fd152
commit 9ffceb91ed
3 changed files with 33 additions and 1 deletions

View File

@@ -67,7 +67,10 @@
(= clicked true)
(.quit (. state app-state))))
;; Any menu key press is a UI interaction too
;; Any menu key press or click is a UI interaction too
(var key-pressed bool (!= 0 (GetKeyPressed)))
(var mouse-pressed bool (IsMouseButtonPressed MOUSE-BUTTON-LEFT))
(if (|| mouse-pressed key-pressed)
(audio-unlock))
(if (|| clicked key-pressed)
(audio-play-menu-click)))