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

@@ -53,13 +53,20 @@ useKeyDown(({ key }) => {
switch (key) {
case "NDS_UP":
selectedOption = "yes";
if (selectedOption !== "yes") {
selectedOption = "yes";
assets.audio.pkmnSelector.play();
}
break;
case "NDS_DOWN":
selectedOption = "no";
if (selectedOption !== "no") {
selectedOption = "no";
assets.audio.pkmnSelector.play();
}
break;
case "NDS_A":
case "NDS_START":
assets.audio.pkmnSelector.play();
setTimeout(() => {
if (selectedOption === "yes") store.visitProject();
store.showConfirmationPopup = false;
@@ -90,12 +97,14 @@ onClick((x, y) => {
const ACTIVATION_DELAY = 50;
if (rectContains([198, 105, 50, 14], [x, y])) {
assets.audio.pkmnSelector.play();
selectedOption = "yes";
setTimeout(() => {
store.visitProject();
store.showConfirmationPopup = false;
}, ACTIVATION_DELAY);
} else if (rectContains([198, 121, 50, 14], [x, y])) {
assets.audio.pkmnSelector.play();
selectedOption = "no";
setTimeout(() => (store.showConfirmationPopup = false), ACTIVATION_DELAY);
}