feat(nds): improve key input system
This commit is contained in:
@@ -162,7 +162,7 @@ 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 }) => {
|
||||
if (
|
||||
currentAnimation ||
|
||||
store.isIntro ||
|
||||
|
||||
@@ -40,7 +40,7 @@ onMounted(() => {
|
||||
|
||||
onUnmounted(() => timeline?.kill());
|
||||
|
||||
useKeyDown((key) => {
|
||||
useKeyDown(({ key }) => {
|
||||
if (!store.showConfirmationPopup) return;
|
||||
|
||||
if (textProgress.value < 1 && key === "NDS_A") {
|
||||
@@ -73,7 +73,7 @@ useKeyDown((key) => {
|
||||
}
|
||||
});
|
||||
|
||||
useKeyUp((key) => {
|
||||
useKeyUp(({ key }) => {
|
||||
if (store.showConfirmationPopup && key === "NDS_A") {
|
||||
waitingForNdsARelease = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user