You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
smoothProgress - Progress of the animation: between 0.0 (at start) and 1.0 (at end) (number)
Example
-- Create a Button with a significant bounce effect.
local frame = SetSmoothProgressExample or CreateFrame('button', "SetSmoothProgressExample", UIParent)
frame:ClearAllPoints()
frame:SetPoint("CENTER", 300, 0)
frame:SetWidth(200)
frame:SetHeight(100)
frame.bg = frame:CreateTexture()
frame.bg:SetTexture(0,0,0,1)
frame.bg:SetAllPoints()
frame:EnableMouse(true)
frame:RegisterForClicks("LeftButtonUp")
local function smoothing(self)
local p = self:GetSmoothProgress()
local c = p^p
self:SetSmoothProgress(c)
end
SetSmoothProgressExample.animationGroup = SetSmoothProgressExample:CreateAnimationGroup()
local scale = SetSmoothProgressExample.animationGroup:CreateAnimation("Scale")
scale:SetFromScale(0,0)
scale:SetToScale(1,1)
scale:SetDuration(1)
scale:SetScript("OnUpdate", smoothing)
SetSmoothProgressExample:SetScript("OnClick", function()
this.animationGroup:Play()
end)