feat(settings): render title and menu image in notification

This commit is contained in:
2025-11-25 18:13:52 +01:00
parent 5ca5c5b892
commit e5e08bacbf
8 changed files with 128 additions and 53 deletions

View File

@@ -5,16 +5,21 @@ import MENU_DISABLED_IMAGE from "/assets/images/settings/top-screen/touch_screen
const props = defineProps<{
x: number;
y: number;
isAnyOtherMenuOpen: boolean;
}>();
const settingsStore = useSettingsStore();
const [menuImage, menuDisabledImage] = useImages(
MENU_IMAGE,
MENU_DISABLED_IMAGE,
);
const isAnyOtherMenuOpen = computed(() =>
settingsStore.isAnyOtherMenuOpen("touchScreen"),
);
useRender((ctx) => {
if (props.isAnyOtherMenuOpen) {
if (isAnyOtherMenuOpen.value) {
ctx.drawImage(menuDisabledImage!, props.x, props.y);
} else {
ctx.drawImage(menuImage!, props.x, props.y);