add option to always show xp bar

This commit is contained in:
shagu
2016-09-18 23:36:15 +02:00
parent 3ae579bb72
commit 445d56f8a8
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -24,6 +24,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("panel", "right", "center", "time")
pfUI:UpdateConfig("panel", "right", "right", "gold")
pfUI:UpdateConfig("panel", "other", "minimap", "zone")
pfUI:UpdateConfig("panel", "xp", "showalways", "0")
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
pfUI:UpdateConfig("chat", "text", "time", "0")
+1
View File
@@ -584,6 +584,7 @@ pfUI:RegisterModule("gui", function ()
pfUI.gui.CreateConfig(pfUI.gui.panel, "Right Panel: Center", pfUI_config.panel.right, "center")
pfUI.gui.CreateConfig(pfUI.gui.panel, "Right Panel: Right", pfUI_config.panel.right, "right")
pfUI.gui.CreateConfig(pfUI.gui.panel, "Other Panel: Minimap", pfUI_config.panel.other, "minimap")
pfUI.gui.CreateConfig(pfUI.gui.panel, "Always show XP and Reputation Bar", pfUI_config.panel.xp, "showalways")
-- tooltip
pfUI.gui.CreateConfig(pfUI.gui.tooltip, "Tooltip Position:", pfUI_config.tooltip, "position")
+2 -1
View File
@@ -30,6 +30,7 @@ pfUI:RegisterModule("xpbar", function ()
end)
pfUI.xp:SetScript("OnUpdate",function()
if pfUI_config.panel.xp.showalways == "1" then return end
if pfUI.xp:GetAlpha() == 0 or pfUI.xp.mouseover == true then return end
if not pfUI.xp.tick then
pfUI.xp.tick = GetTime() + 0.01
@@ -109,12 +110,12 @@ pfUI:RegisterModule("xpbar", function ()
pfUI.rep.bar:SetStatusBarColor((color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5, 1)
pfUI.rep:SetAlpha(1)
pfUI.rep.tick = GetTime() + 3.00
end
end
end)
pfUI.rep:SetScript("OnUpdate",function()
if pfUI_config.panel.xp.showalways == "1" then return end
if pfUI.rep:GetAlpha() == 0 or pfUI.rep.mouseover == true then return end
if not pfUI.rep.tick then
pfUI.rep.tick = GetTime() + 0.01