unitframes: add option to hide frames

This commit is contained in:
shagu
2017-04-19 19:45:14 +02:00
parent 2c6c212c2d
commit 20861d9373
3 changed files with 27 additions and 0 deletions
+11
View File
@@ -1,6 +1,7 @@
pfUI.uf = CreateFrame("Frame",nil,UIParent)
local uf_defaults = {
visible = "1",
portrait = "bar",
width = "200",
height = "50",
@@ -10,6 +11,11 @@ local uf_defaults = {
buffsize = "20",
debuffs = "top",
debuffsize = "20",
invert_healthbar = "0",
buff_indicator = "0",
debuff_indicator = "0",
clickcast = "0",
faderange = "0",
}
local pfValidUnits = {}
@@ -66,6 +72,11 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
f.config = config or uf_defaults
f.tick = tick
if f.config.visible ~= "1" then
f:Hide()
return
end
f.hp = CreateFrame("Frame",nil, f)
f.hp:SetPoint("TOP", 0, 0)
f.hp:SetWidth(f.config.width)