feat(nds): add audio in all menus

This commit is contained in:
2026-02-25 14:52:48 +01:00
parent 61aec3da2e
commit bbe20150ed
45 changed files with 240 additions and 117 deletions

View File

@@ -45,6 +45,18 @@ export const useConfirmationModal = defineStore("confirmationModal", {
this.isClosing = false;
this.isOpen = true;
const { assets } = useAssets();
if (
options.aLabel !== undefined ||
options.bLabel !== undefined ||
options.onActivateA !== undefined ||
options.onActivateB !== undefined
) {
assets.audio.menuOpen.play();
} else {
assets.audio.menuConfirmed.play();
}
gsap
.timeline()
// standard buttons down
@@ -83,6 +95,20 @@ export const useConfirmationModal = defineStore("confirmationModal", {
this.isClosing = true;
if (
this.aLabel !== null ||
this.bLabel !== null ||
this.onActivateA !== null ||
this.onActivateB !== null
) {
const { assets } = useAssets();
if (choice === "A") {
assets.audio.menuConfirmed.play();
} else {
assets.audio.menuError.play();
}
}
const keepButtonsDown =
typeof this.keepButtonsDown === "function"
? this.keepButtonsDown(choice)