Mercurial > wow > buffalo2
changeset 76:83b3cdaae6a5
refactor into addons
author | Nenue |
---|---|
date | Sat, 27 Aug 2016 10:45:05 -0400 |
parents | d9d16e67725c |
children | 51f248dc0276 |
files | .hgsub Modules/PaperDoll.lua Options.lua Veneer.lua Veneer.toc |
diffstat | 4 files changed, 12 insertions(+), 30 deletions(-) [+] |
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, ...)
--- a/Options.lua Sat Aug 27 07:09:54 2016 -0400 +++ b/Options.lua Sat Aug 27 10:45:05 2016 -0400 @@ -1,8 +1,7 @@ -local vn, print = LibStub("LibKraken").register(Veneer, "Options") local plugin = CreateFrame('Frame', 'VeneerOptions', UIParent, 'TooltipBorderedFrameTemplate') -vn.wrap(plugin) +local vn, print = LibStub("LibKraken").register(Veneer, plugin) local fields = {} local templateTypes = {