diff --git a/api/unitframes.lua b/api/unitframes.lua index 98f67a77..6bf541b6 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -1,9 +1,19 @@ -pfUI.uf = CreateFrame("Frame",nil,UIParent) -pfUI.uf.frames = {} - -- load pfUI environment setfenv(1, pfUI:GetEnvironment()) +pfUI.uf = CreateFrame("Frame", nil, UIParent) +pfUI.uf:SetScript("OnUpdate", function() + if InCombatLockdown and not InCombatLockdown() then + for frame in pairs(pfUI.uf.delayed) do + frame:UpdateVisibility() + pfUI.uf.delayed[frame] = nil + end + end +end) + +pfUI.uf.frames = {} +pfUI.uf.delayed = {} + local glow = { edgeFile = pfUI.media["img:glow"], edgeSize = 8, insets = {left = 0, right = 0, top = 0, bottom = 0},