fix: block interactions when animation is happening
This commit is contained in:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user