feat: centralize all screen related callbacks in useScreen
This commit is contained in:
@@ -4,6 +4,8 @@ const props = defineProps<{
|
||||
y: number;
|
||||
}>();
|
||||
|
||||
const { onRender } = useScreen();
|
||||
|
||||
const settingsStore = useSettingsStore();
|
||||
const menusContext = inject<{
|
||||
isSubmenuSelected: ComputedRef<boolean>;
|
||||
@@ -27,7 +29,7 @@ const isAnyOtherMenuOpen = computed(() => {
|
||||
|
||||
const animation = useMenuAnimation("user", isOpen);
|
||||
|
||||
useRender((ctx) => {
|
||||
onRender((ctx) => {
|
||||
ctx.translate(props.x, props.y);
|
||||
|
||||
if (isOpen.value || animation.playing) {
|
||||
|
||||
Reference in New Issue
Block a user