feat(nds): add audio in all menus
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user