From bb1cc05d26038a07133b15c834b1c8da9acc6a28 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 1 Jul 2018 22:01:30 +0200 Subject: [PATCH] unitframes: allow to disable specific unitframes --- api/unitframes.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/unitframes.lua b/api/unitframes.lua index 5644ff0b..7dddff8a 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -762,6 +762,15 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) f:UpdateFrameSize() f:EnableScripts() + if f.config.visible == "1" then + pfUI.uf:RefreshUnit(f, "all") + f:EnableScripts() + f:UpdateFrameSize() + else + f:UnregisterAllEvents() + f:Hide() + end + table.insert(pfUI.uf.frames, f) return f end