X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/e410c5d67984d70758631f799bb8517f369d8fa1..bf7bbcc53ab8a1db9cef615c4db7ce0c7abe797d:/OmaRF/Core.lua diff --git a/OmaRF/Core.lua b/OmaRF/Core.lua index 34b4657..e0ecbd1 100644 --- a/OmaRF/Core.lua +++ b/OmaRF/Core.lua @@ -1,18 +1,15 @@ +local unpack, wipe, next, pairs, ipairs = unpack, wipe, next, pairs, ipairs; + OmaRF = CreateFrame("Frame"); OmaRF.normalBarColor = CreateColor(0.3, 0.3, 0.3); OmaRF.dispelBarColor = CreateColor(1, 0.5, 0); OmaRF.normalBackColor = {0.7, 0.7, 0.7}; OmaRF.dispelBackColor = {0.5, 0.2, 0}; - -OmaRF.frames = {}; -OmaRF.majorFrames = {}; OmaRF.positions = { "TOPLEFT", "TOPRIGHT", "CENTER", "BOTTOMLEFT", "BOTTOMRIGHT" }; - OmaRF.running = false; - OmaRF.ooc_queue = {}; local defaults = { @@ -54,23 +51,13 @@ end function OmaRF:OnDisable() self.running = false; - for name, frame in pairs(self.frames) do - for _, ind in pairs(frame) do - ind.text:Hide(); - ind.icon:Hide(); - end - for _, ind in ipairs(self.majorFrames[name]) do - ind.icon:Hide(); - ind.expire:Hide(); - ind.stack:Hide(); - end - end + self.frameBase:Hide(); end local function onEvent(self, event, ...) if event == "PLAYER_REGEN_ENABLED" then for _, t in pairs(self.ooc_queue) do - t.func(t.args); + t.func(unpack(t.args)); end if next(self.ooc_queue) ~= nil then wipe(self.ooc_queue);