mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- minor optimization of frame rotation by un-registering the event listening for animation completion after it has done its job
- made GCD module animation smooth by utilizing the existing animation system instead of trying to run another repeating timer over the top
This commit is contained in:
@ -1231,10 +1231,10 @@ function IceBarElement.prototype:RotateFrame(frame)
|
||||
rot:SetDuration(0.001)
|
||||
rot:SetDegrees(-90)
|
||||
rot:SetOrigin("BOTTOMLEFT", 0, 0)
|
||||
rot:SetScript("OnUpdate", function(anim) if anim:GetProgress() >= 1 then anim:Pause() end end)
|
||||
grp.rot = rot
|
||||
frame.anim = grp
|
||||
end
|
||||
frame.anim.rot:SetScript("OnUpdate", function(anim) if anim:GetProgress() >= 1 then anim:Pause() anim:SetScript("OnUpdate", nil) end end)
|
||||
frame.anim:Play()
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user