feat(settings): menu animations

This commit is contained in:
2025-11-25 15:50:28 +01:00
parent 44a84452d0
commit 5ca5c5b892
15 changed files with 189 additions and 34 deletions

View File

@@ -1,15 +1,24 @@
<script setup lang="ts">
import MENU_IMAGE from "/assets/images/settings/top-screen/touch_screen/touch_screen.webp";
import MENU_IMAGE from "/assets/images/settings/top-screen/touch_screen/touch-screen.webp";
import MENU_DISABLED_IMAGE from "/assets/images/settings/top-screen/touch_screen/touch-screen-disabled.png";
const props = defineProps<{
x: number;
y: number;
isAnyOtherMenuOpen: boolean;
}>();
const [menuImage] = useImages(MENU_IMAGE);
const [menuImage, menuDisabledImage] = useImages(
MENU_IMAGE,
MENU_DISABLED_IMAGE,
);
useRender((ctx) => {
ctx.drawImage(menuImage!, props.x, props.y);
if (props.isAnyOtherMenuOpen) {
ctx.drawImage(menuDisabledImage!, props.x, props.y);
} else {
ctx.drawImage(menuImage!, props.x, props.y);
}
});
defineOptions({