feat(nds): don't display help button and hints on smaller screens (they can't click on the buttons anyway)

This commit is contained in:
2026-02-22 22:50:24 +01:00
parent 48688544f1
commit 28cd10bb08
2 changed files with 18 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
<script setup lang="ts">
import { useWindowSize } from "@vueuse/core";
import gsap from "gsap";
const { isReady } = useAssets();
@@ -25,6 +26,16 @@ const toggleFullscreen = () => {
}
};
const windowSize = useWindowSize();
watch([windowSize.width, windowSize.height], ([width, height]) => {
if (width / height > 614 / 667) {
app.allowHints();
} else {
app.disallowHints();
}
});
const helpButton = useTemplateRef("helpButton");
let helpAnimation: gsap.core.Timeline | null = null;