feat: animate home screen buttons on click

This commit is contained in:
2025-11-13 13:52:40 +01:00
parent 101103bde4
commit 5cfa906324
7 changed files with 63 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
const props = defineProps<{
x: number;
y: number;
opacity: number;
}>();
const buttonImage = useTemplateRef("buttonImage");
@@ -9,6 +10,7 @@ const buttonImage = useTemplateRef("buttonImage");
useRender((ctx) => {
if (!buttonImage.value) return;
ctx.globalAlpha = props.opacity / 100;
ctx.drawImage(buttonImage.value, props.x, props.y);
});
</script>