From 99e1da8e58bc3828bdbe474ca26821d61f050fe6 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Sun, 4 Jan 2026 20:53:52 +0100 Subject: [PATCH] feat(gallery): transition to and from the nds --- .../Gallery/BottomScreen/BottomScreen.vue | 21 +++ .../Gallery/TopScreen/TopScreen.vue | 31 ++++ app/components/Home/BottomScreen/Buttons.vue | 29 +++- app/components/NDS.vue | 10 ++ app/pages/gallery.vue | 3 + app/pages/index.vue | 8 +- app/stores/app.ts | 6 + app/stores/gallery.ts | 147 ++++++++++++++++++ app/stores/home.ts | 7 +- app/types/app.d.ts | 2 +- i18n/locales/en.json | 3 +- .../bottom-screen/buttons/downloadPlay.webp | Bin 470 -> 0 bytes .../home/bottom-screen/buttons/gallery.webp | Bin 0 -> 384 bytes 13 files changed, 253 insertions(+), 14 deletions(-) create mode 100644 app/components/Gallery/BottomScreen/BottomScreen.vue create mode 100644 app/components/Gallery/TopScreen/TopScreen.vue create mode 100644 app/stores/gallery.ts delete mode 100644 public/nds/images/home/bottom-screen/buttons/downloadPlay.webp create mode 100644 public/nds/images/home/bottom-screen/buttons/gallery.webp diff --git a/app/components/Gallery/BottomScreen/BottomScreen.vue b/app/components/Gallery/BottomScreen/BottomScreen.vue new file mode 100644 index 0000000..b0c256e --- /dev/null +++ b/app/components/Gallery/BottomScreen/BottomScreen.vue @@ -0,0 +1,21 @@ + + + diff --git a/app/components/Gallery/TopScreen/TopScreen.vue b/app/components/Gallery/TopScreen/TopScreen.vue new file mode 100644 index 0000000..7bbdc61 --- /dev/null +++ b/app/components/Gallery/TopScreen/TopScreen.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/Home/BottomScreen/Buttons.vue b/app/components/Home/BottomScreen/Buttons.vue index 1e8a8e2..764401b 100644 --- a/app/components/Home/BottomScreen/Buttons.vue +++ b/app/components/Home/BottomScreen/Buttons.vue @@ -11,7 +11,7 @@ const { selectedButton, selectorPosition } = useButtonNavigation({ buttons: { projects: [31, 23, 193, 49], contact: [31, 71, 97, 49], - downloadPlay: [127, 71, 97, 49], + gallery: [127, 71, 97, 49], theme: [0, 167, 31, 26], settings: [112, 167, 31, 26], @@ -19,7 +19,7 @@ const { selectedButton, selectorPosition } = useButtonNavigation({ }, initialButton: "projects", onButtonClick: (button) => { - if (button === "downloadPlay" || button === "theme" || button === "alarm") + if (button === "theme" || button === "alarm") throw new Error(`Not implemented: ${button}`); store.animateOutro(button); @@ -28,15 +28,15 @@ const { selectedButton, selectorPosition } = useButtonNavigation({ projects: { down: "last", left: "contact", - right: "downloadPlay", + right: "gallery", horizontalMode: "preview", }, contact: { up: "projects", - right: "downloadPlay", + right: "gallery", down: "settings", }, - downloadPlay: { + gallery: { up: "projects", left: "contact", down: "settings", @@ -70,6 +70,19 @@ const getOpacity = (button?: (typeof selectedButton)["value"]) => { onRender((ctx) => { ctx.globalAlpha = getOpacity(); + + // gallery + ctx.font = "7px NDS7"; + ctx.fillStyle = "#2c2c2c"; + fillTextCentered( + ctx, + $t("home.photoGallery"), + 132, + 78 + getButtonOffset("gallery"), + 87, + ); + + // gba thing ctx.font = "10px NDS10"; ctx.fillStyle = "#a2a2a2"; fillTextCentered(ctx, $t("home.greeting"), 79, 135, 140); @@ -91,9 +104,9 @@ onRender((ctx) => { />