feat: centralize all screen related callbacks in useScreen

This commit is contained in:
2025-12-29 21:01:19 +01:00
parent 4960bef2fc
commit d77d595370
42 changed files with 184 additions and 128 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
const store = useProjectsStore();
const { onRender } = useScreen();
const store = useProjectsStore();
const { assets } = useAssets();
const drawTextWithShadow = (
@@ -54,7 +55,7 @@ const drawTextWithShadow2Lines = (
drawTextWithShadow(ctx, line2Color, secondLine, x, y + 16);
};
useRender((ctx) => {
onRender((ctx) => {
ctx.drawImage(assets.projects.topScreen.background, 0, 0);
ctx.textBaseline = "hanging";