fix(projects): block interactions during animation
This commit is contained in:
@@ -79,7 +79,7 @@ const startButtonAnimation = (type: ButtonType) => {
|
||||
};
|
||||
|
||||
useScreenClick((x, y) => {
|
||||
if (currentAnimation) return;
|
||||
if (currentAnimation || store.isIntro || store.isOutro) return;
|
||||
|
||||
const project = store.projects[store.currentProject];
|
||||
if (circleContains(BUTTONS.prev.position, [x, y], CLICK_RADIUS)) {
|
||||
@@ -131,7 +131,7 @@ useRender((ctx) => {
|
||||
ctx.fillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
});
|
||||
useKeyDown((key) => {
|
||||
if (currentAnimation) return;
|
||||
if (currentAnimation || store.isIntro || store.isOutro) return;
|
||||
switch (key) {
|
||||
case "NDS_LEFT":
|
||||
startButtonAnimation("prev");
|
||||
|
||||
Reference in New Issue
Block a user