feat(nds): improve some button interactions

This commit is contained in:
2026-02-10 17:00:11 +01:00
parent 93e6922b68
commit 069884123b
5 changed files with 18 additions and 8 deletions

View File

@@ -162,7 +162,8 @@ onRender((ctx) => {
ctx.fillStyle = `rgba(0, 0, 0, ${store.isIntro ? store.intro.fadeOpacity : store.isOutro ? store.outro.fadeOpacity : 0})`;
ctx.fillRect(0, 0, LOGICAL_WIDTH, LOGICAL_HEIGHT);
});
useKeyDown(({ key }) => {
useKeyDown(({ key, repeated }) => {
if (
currentAnimation ||
store.isIntro ||
@@ -185,11 +186,15 @@ useKeyDown(({ key }) => {
}
break;
case "NDS_B":
if (repeated) break;
startButtonAnimation("quit");
store.animateOutro();
break;
case "NDS_A":
case "NDS_START":
if (repeated) break;
startButtonAnimation("link");
setTimeout(
() => (store.showConfirmationPopup = true),