feat(settings): render title and menu image in notification
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user