castbar: add option to hide player and target castbar

This commit is contained in:
shagu
2016-11-09 23:07:20 +01:00
parent 1b570acc79
commit 37fdaa5367
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -136,6 +136,8 @@ pfUI:RegisterModule("castbar", function ()
end)
pfUI.castbar.player:SetScript("OnUpdate", function ()
if pfUI_config.castbar.player.hide_pfui == "1" then pfUI.castbar.player:Hide() return end
-- fadeout
if pfUI.castbar.player.fadeout and pfUI.castbar.player:GetAlpha() > 0 then
pfUI.castbar.player:SetAlpha(pfUI.castbar.player:GetAlpha()-0.025)
@@ -297,6 +299,7 @@ pfUI:RegisterModule("castbar", function ()
end)
pfUI.castbar.target.bar:SetScript("OnUpdate", function()
if pfUI_config.castbar.target.hide_pfui == "1" then pfUI.castbar.target:Hide() return end
if UnitExists("target") and pfUI.castbar.target.casterDB[UnitName("target")] then
local spellname = pfUI.castbar.target.casterDB[UnitName("target")].cast or 0
local starttime = pfUI.castbar.target.casterDB[UnitName("target")].starttime or 0
+2
View File
@@ -39,6 +39,8 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("panel", "micro", "enable", "0")
pfUI:UpdateConfig("panel", "xp", "showalways", "0")
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0")
pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0")
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
pfUI:UpdateConfig("chat", "text", "input_width", "0")
pfUI:UpdateConfig("chat", "text", "input_height", "0")
+3
View File
@@ -616,6 +616,9 @@ pfUI:RegisterModule("gui", function ()
-- castbar
pfUI.gui.castbar = pfUI.gui:CreateConfigTab("Castbar")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Hide blizzards castbar:", pfUI_config.castbar.player, "hide_blizz", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Hide pfUI player castbar:", pfUI_config.castbar.player, "hide_pfui", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Hide pfUI target castbar:", pfUI_config.castbar.target, "hide_pfui", "checkbox")
-- chat
pfUI.gui.chat = pfUI.gui:CreateConfigTab("Chat")