feat(nds): handle swipes

This commit is contained in:
2026-02-12 00:57:46 +01:00
parent 29b2f79a9a
commit f5090c9d49
5 changed files with 76 additions and 5 deletions

View File

@@ -252,7 +252,7 @@ onRender((ctx) => {
10,
2,
118,
false,
true,
);
drawButton(
ctx,
@@ -260,7 +260,7 @@ onRender((ctx) => {
138,
2,
108,
false,
true,
);
}, 110);
@@ -559,15 +559,19 @@ useKeyDown(({ key }) => {
];
break;
case "NDS_UP":
case "NDS_SWIPE_UP":
slide(-1, 0);
break;
case "NDS_DOWN":
case "NDS_SWIPE_DOWN":
slide(1, 0);
break;
case "NDS_LEFT":
case "NDS_SWIPE_LEFT":
slide(0, -1);
break;
case "NDS_RIGHT":
case "NDS_SWIPE_RIGHT":
slide(0, 1);
break;
}