Strengthen subtle animations: pin scale-pops, window slide-in/out with overshoot, panel slides, zButton cascade, zBar springy stagger

This commit is contained in:
DuvelCorp
2026-09-10 17:21:10 +02:00
parent 66ff1ae711
commit 3233ebff7f
5 changed files with 61 additions and 15 deletions
+16 -5
View File
@@ -15,8 +15,9 @@ local function MTH_BOOK_FadeInWindow(frame)
-- Slide the whole window up into place while fading in. Position and alpha are
-- the only safe properties on a complex frame: the built-in "scale" tween
-- resizes width/height, which the child widgets do NOT follow (they clip), so
-- a slide + fade is the strongest effect that keeps the layout intact.
Sauce:SlideIn(frame, "UP", 60, 0.4, "outCubic")
-- a slide + fade is the strongest effect that keeps the layout intact. A
-- bigger travel + springy "outBack" overshoot makes the entrance pop.
Sauce:SlideIn(frame, "UP", 110, 0.5, "outBack")
end
-- Fade the results list back in when switching Hunter's Book tabs, unless disabled.
@@ -26,7 +27,9 @@ local function MTH_BOOK_AnimateTabSwitch()
local list = getglobal("MTH_BOOK_ListBackdrop")
if not list then return end
if type(list.SetAlpha) == "function" then list:SetAlpha(0) end
Sauce:FadeIn(list, 0.25)
-- Slide the list in from the right while fading so the tab change reads as
-- motion rather than a faint brightness bump.
Sauce:SlideIn(list, "RIGHT", 55, 0.3, "outCubic")
end
-- Fade the book window out before hiding it, unless disabled (shares the
@@ -39,10 +42,17 @@ local function MTH_BOOK_FadeOutWindow(frame)
frame:Hide()
return
end
Sauce:FadeOut(frame, 0.22, "inQuad", {
-- Capture the resting anchor so SlideOut's downward displacement can be
-- restored once the window is hidden (otherwise the next open is offset).
local p, rel, rp, x, y = frame:GetPoint(1)
Sauce:SlideOut(frame, "DOWN", 90, 0.26, "inCubic", {
onFinish = function()
frame:Hide()
if type(frame.SetAlpha) == "function" then frame:SetAlpha(1) end
if p then
frame:ClearAllPoints()
frame:SetPoint(p, rel, rp, x, y)
end
end,
})
end
@@ -54,7 +64,8 @@ local function MTH_BOOK_AnimateSearchResults()
local list = getglobal("MTH_BOOK_ListBackdrop")
if not list then return end
if type(list.SetAlpha) == "function" then list:SetAlpha(0) end
Sauce:FadeIn(list, 0.22)
-- Slide the refreshed list in from the right so a search visibly refreshes.
Sauce:SlideIn(list, "RIGHT", 45, 0.26, "outCubic")
end
MTH_HUNTERBOOK_LOADED = true