Mercurial > wow > buffalo2
diff Modules/PaperDoll.lua @ 76:83b3cdaae6a5
refactor into addons
author | Nenue |
---|---|
date | Sat, 27 Aug 2016 10:45:05 -0400 |
parents | d9d16e67725c |
children | bb6b532c5d2f |
line wrap: on
line diff
--- a/Modules/PaperDoll.lua Sat Aug 27 07:09:54 2016 -0400 +++ b/Modules/PaperDoll.lua Sat Aug 27 10:45:05 2016 -0400 @@ -116,28 +116,22 @@ end end +local UpdateNext = function(frame) + + plugin.next(function() + print('updating', frame:GetName()) + UpdateVeneer(frame:GetParent(), frame) + end) +end + + local UpdateAll = function() for index, frame in pairs(vnslot) do if frame:IsVisible() then print('forcing', index, frame:GetName()) - tinsert(pendingSlots, frame) + UpdateNext(frame) end end - plugin.ticker() -end - -local UpdateNext = function() - - local frame = tremove(pendingSlots) - if frame and frame:IsVisible() then - print('updating', frame:GetName()) - UpdateVeneer(frame:GetParent(), frame) - else - - ticker:Cancel() - ticker = nil - end - end @@ -177,15 +171,9 @@ tinsert(pendingSlots, frame) end - plugin.ticker() end -plugin.ticker = function() - if (not ticker) and #pendingSlots >= 1 then - ticker = C_Timer.NewTicker(0, UpdateNext) - end -end plugin.event = function(self, event, ...)