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

@@ -9,10 +9,10 @@ import START_UP_IMAGE from "/assets/images/settings/top-screen/options/start-up.
const props = defineProps<{
x: number;
y: number;
isOpen: boolean;
isAnyOtherMenuOpen: boolean;
}>();
const settingsStore = useSettingsStore();
const [
menuImage,
menuActiveImage,
@@ -29,12 +29,17 @@ const [
START_UP_IMAGE,
);
const animation = useMenuAnimation(toRef(() => props.isOpen));
const isOpen = computed(() => settingsStore.isMenuOpen("options"));
const isAnyOtherMenuOpen = computed(() =>
settingsStore.isAnyOtherMenuOpen("options"),
);
const animation = useMenuAnimation(isOpen);
useRender((ctx) => {
ctx.translate(props.x, props.y);
if (props.isOpen || animation.playing) {
if (isOpen.value || animation.playing) {
ctx.drawImage(languageImage!, 0, -48 + animation.stage1Offset);
ctx.drawImage(
gbaModeImage!,
@@ -48,7 +53,7 @@ useRender((ctx) => {
);
ctx.drawImage(menuActiveImage!, 0, 0);
} else if (props.isAnyOtherMenuOpen) {
} else if (isAnyOtherMenuOpen.value) {
ctx.drawImage(menuDisabledImage!, 0, 0);
} else {
ctx.drawImage(menuImage!, 0, 0);