thirdparty: add druidbar skin for tbc

This commit is contained in:
shagu
2020-06-07 12:17:36 +02:00
parent 9ff971c21a
commit 7b8a036aa0
3 changed files with 28 additions and 0 deletions
+1
View File
@@ -693,6 +693,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("thirdparty", "atlasloot", "enable", "1") pfUI:UpdateConfig("thirdparty", "atlasloot", "enable", "1")
pfUI:UpdateConfig("thirdparty", "myroleplay", "enable", "1") pfUI:UpdateConfig("thirdparty", "myroleplay", "enable", "1")
pfUI:UpdateConfig("thirdparty", "druidmana", "enable", "1") pfUI:UpdateConfig("thirdparty", "druidmana", "enable", "1")
pfUI:UpdateConfig("thirdparty", "druidbar", "enable", "1")
pfUI:UpdateConfig("thirdparty", "noteit", "enable", "1") pfUI:UpdateConfig("thirdparty", "noteit", "enable", "1")
pfUI:UpdateConfig("thirdparty", "recount", "skin", "1") pfUI:UpdateConfig("thirdparty", "recount", "skin", "1")
pfUI:UpdateConfig("thirdparty", "recount", "dock", "1") pfUI:UpdateConfig("thirdparty", "recount", "dock", "1")
+1
View File
@@ -2107,6 +2107,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(nil, "HealComm", C.thirdparty.healcomm, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "HealComm", C.thirdparty.healcomm, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "SortBags", C.thirdparty.sortbags, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "SortBags", C.thirdparty.sortbags, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "MrPlow", C.thirdparty.mrplow, "enable", "checkbox") CreateConfig(nil, "MrPlow", C.thirdparty.mrplow, "enable", "checkbox")
CreateConfig(nil, "DruidBar", C.thirdparty.druidbar, "enable", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "FlightMap", C.thirdparty.flightmap, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "FlightMap", C.thirdparty.flightmap, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "TheoryCraft", C.thirdparty.theorycraft, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "TheoryCraft", C.thirdparty.theorycraft, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "SuperMacro", C.thirdparty.supermacro, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "SuperMacro", C.thirdparty.supermacro, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
+26
View File
@@ -182,4 +182,30 @@ pfUI:RegisterModule("thirdparty-tbc", "tbc", function ()
end end
end end
end) end)
HookAddonOrVariable("DruidBarFrame", function()
if C.thirdparty.druidbar.enable == "0" then return end
local p = ManaBarColor[0]
local pr, pg, pb = 0, 0, 0
if p then pr, pg, pb = p.r + .5, p.g +.5, p.b +.5 end
DruidBarKey.color = { pr, pg, pb, 1 }
DruidBarKey.bordercolor = {1,1,1,0}
DruidBarKey.bgcolor = {0,0,0,0}
DruidBarKey.manatexture = pfUI.media["img:bar"]
DruidBarKey.bordertexture = ""
hooksecurefunc("DruidBar_MainGraphics", function()
local f = pfUI.uf.player
DruidBarFrame:SetWidth((f.config.pwidth ~= "-1" and f.config.pwidth or f.config.width))
DruidBarFrame:SetHeight(f.config.pheight)
DruidBarMana:SetAllPoints(DruidBarFrame)
DruidBarText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
DruidBarText1:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
StripTextures(DruidBarFrame)
CreateBackdrop(DruidBarFrame)
CreateBackdropShadow(DruidBarFrame)
end)
end)
end) end)