fix(settings): synchronize button animation with arrows of number input

This commit is contained in:
2026-02-12 15:31:37 +01:00
parent b188812e82
commit 0bc8378bcb
13 changed files with 226 additions and 54 deletions

View File

@@ -1,5 +1,8 @@
import gsap from "gsap";
// not sure how i came up with it last night
export const SUBMENU_LABEL_CHANGE_DELAY = 0.25 + 0.15 - (0.167 + 0.08);
export const SETTINGS_MENUS = [
"options",
"clock",
@@ -80,23 +83,9 @@ export const useSettingsStore = defineStore("settings", {
{ offsetY: 0, opacity: 1, duration: 0.25, ease: "none" },
"+=0.05",
)
.to(this, {
submenuButtonsOffsetY: 24,
duration: 0.167,
ease: "none",
})
.call(() => {
this.currentSubMenu = submenu;
})
.to(
this,
{
submenuButtonsOffsetY: 0,
duration: 0.167,
ease: "none",
},
"+=0.05",
);
});
const achievements = useAchievementsStore();
if (!achievements.advancement.visitedSettings.includes(submenu)) {