feat(nds): improve some button interactions
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user