mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-09-22 07:36:58 +00:00
zBar: speed up assemble animation
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user