zBar: speed up assemble animation

This commit is contained in:
DuvelCorp
2026-09-10 17:43:04 +02:00
parent c5a42d8d2a
commit e7cf99facb
+3 -3
View File
@@ -307,9 +307,9 @@ function MTH_ZBar_AnimateActivate()
local count = table.getn(shownButtons)
-- Cap the total stagger window so a full bar assembles just as quickly as a
-- short one: the per-button delay shrinks as the button count grows.
local step = 0.05
local step = 0.035
if count > 1 then
local maxWindow = 0.28
local maxWindow = 0.18
if step * (count - 1) > maxWindow then
step = maxWindow / (count - 1)
end
@@ -319,7 +319,7 @@ function MTH_ZBar_AnimateActivate()
btn:SetAlpha(0)
-- Staggered springy slide-up so the bar visibly assembles button by
-- button instead of a faint collective fade.
ZBar_Sauce:SlideIn(btn, "UP", 26, 0.26, "outBack", { delay = (i - 1) * step })
ZBar_Sauce:SlideIn(btn, "UP", 26, 0.20, "outBack", { delay = (i - 1) * step })
end
end