castbar: add options to hide player and target bar

This commit is contained in:
shagu
2018-06-02 11:09:23 +02:00
parent 62e607682d
commit 564ec6e8c5
+20 -16
View File
@@ -124,26 +124,30 @@ pfUI:RegisterModule("castbar", function ()
end
-- [[ pfPlayerCastbar ]] --
pfUI.castbar.player = CreateCastbar("pfPlayerCastbar", UIParent, "player")
if C.castbar.player.hide_pfui == "0" then
pfUI.castbar.player = CreateCastbar("pfPlayerCastbar", UIParent, "player")
if pfUI.uf.player then
local pspace = tonumber(C.unitframes.player.pspace)
pfUI.castbar.player:SetPoint("TOPLEFT", pfUI.uf.player, "BOTTOMLEFT", 0, -default_border * 2 - pspace)
pfUI.castbar.player:SetWidth(pfUI.uf.player:GetWidth())
else
pfUI.castbar.player:SetPoint("CENTER", 0, -200)
pfUI.castbar.player:SetWidth(200)
if pfUI.uf.player then
local pspace = tonumber(C.unitframes.player.pspace)
pfUI.castbar.player:SetPoint("TOPLEFT", pfUI.uf.player, "BOTTOMLEFT", 0, -default_border * 2 - pspace)
pfUI.castbar.player:SetWidth(pfUI.uf.player:GetWidth())
else
pfUI.castbar.player:SetPoint("CENTER", 0, -200)
pfUI.castbar.player:SetWidth(200)
end
end
-- [[ pfTargetCastbar ]] --
pfUI.castbar.target = CreateCastbar("pfTargetCastbar", UIParent, "target")
if C.castbar.target.hide_pfui == "0" then
pfUI.castbar.target = CreateCastbar("pfTargetCastbar", UIParent, "target")
if pfUI.uf.target then
local pspace = tonumber(C.unitframes.target.pspace)
pfUI.castbar.target:SetPoint("TOPLEFT", pfUI.uf.target, "BOTTOMLEFT", 0, -default_border * 2 - pspace)
pfUI.castbar.target:SetWidth(pfUI.uf.target:GetWidth())
else
pfUI.castbar.target:SetPoint("CENTER", 0, -225)
pfUI.castbar.target:SetWidth(200)
if pfUI.uf.target then
local pspace = tonumber(C.unitframes.target.pspace)
pfUI.castbar.target:SetPoint("TOPLEFT", pfUI.uf.target, "BOTTOMLEFT", 0, -default_border * 2 - pspace)
pfUI.castbar.target:SetWidth(pfUI.uf.target:GetWidth())
else
pfUI.castbar.target:SetPoint("CENTER", 0, -225)
pfUI.castbar.target:SetWidth(200)
end
end
end)