diff --git a/modules/config.lua b/modules/config.lua index 7c437bfa..f445304c 100644 --- a/modules/config.lua +++ b/modules/config.lua @@ -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") diff --git a/modules/gui.lua b/modules/gui.lua index 70bdabd1..57dd9ae3 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -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") diff --git a/modules/xpbar.lua b/modules/xpbar.lua index 2d6e2d9b..a44175ff 100644 --- a/modules/xpbar.lua +++ b/modules/xpbar.lua @@ -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