feat: centralize all screen related callbacks in useScreen
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user