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

@@ -12,6 +12,8 @@ const props = withDefaults(
},
);
const { onRender } = useScreen();
const app = useAppStore();
const { assets } = useAssets();
@@ -19,7 +21,7 @@ const BAR_WIDTH = 256;
const BAR_HEIGHT = 24;
const TITLE_Y = 5;
useRender((ctx) => {
onRender((ctx) => {
ctx.globalAlpha = props.opacity;
// top bar