fix: block interactions when animation is happening

This commit is contained in:
2025-12-20 14:55:49 +01:00
parent 4d69144002
commit 4745a49a63
4 changed files with 16 additions and 14 deletions

View File

@@ -43,9 +43,10 @@ const { selectedButton, selectorPosition } = useButtonNavigation({
},
},
initialButton: "github",
onButtonClick: async (button) => {
onButtonClick: (button) => {
actionateButton(button);
},
disabled: computed(() => store.isIntro || store.isOutro),
});
const actionateButton = async (button: (typeof selectedButton)["value"]) => {
@@ -71,7 +72,7 @@ const QUIT_BUTTON: Rect = [31, 172, 80, 18];
const OK_BUTTON: Rect = [144, 172, 80, 18];
useScreenClick((x, y) => {
if (modalState.value.isOpen) {
if (modalState.value.isOpen || store.isIntro || store.isOutro) {
return;
}
@@ -83,7 +84,7 @@ useScreenClick((x, y) => {
});
useKeyDown((key) => {
if (modalState.value.isOpen) return;
if (modalState.value.isOpen || store.isIntro || store.isOutro) return;
switch (key) {
case "NDS_B":