mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 18:06:02 +00:00
thirdparty: add druidmanabar support
This commit is contained in:
@@ -703,6 +703,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("thirdparty", "sortbags", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "flightmap", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "atlasloot", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "druidmana", "enable", "1")
|
||||
pfUI:UpdateConfig("position", nil, nil, nil)
|
||||
pfUI:UpdateConfig("disabled", nil, nil, nil)
|
||||
|
||||
|
||||
@@ -1237,6 +1237,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, this, T["SortBags"], C.thirdparty.sortbags, "enable", "checkbox")
|
||||
CreateConfig(nil, this, T["FlightMap"], C.thirdparty.flightmap, "enable", "checkbox")
|
||||
CreateConfig(nil, this, T["AtlasLoot"], C.thirdparty.atlasloot, "enable", "checkbox")
|
||||
CreateConfig(nil, this, T["DruidManaBar"], C.thirdparty.druidmana, "enable", "checkbox")
|
||||
this.setup = true
|
||||
end
|
||||
end)
|
||||
|
||||
+24
-1
@@ -16,10 +16,11 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
local lurker = CreateFrame("Frame", nil)
|
||||
lurker.func = func
|
||||
lurker:RegisterEvent("VARIABLES_LOADED")
|
||||
lurker:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
lurker:SetScript("OnEvent",function()
|
||||
if IsAddOnLoaded(addon) or _G[addon] then
|
||||
this:func()
|
||||
this:UnregisterEvent("VARIABLES_LOADED")
|
||||
this:UnregisterAllEvents()
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -582,6 +583,28 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
end
|
||||
end)
|
||||
|
||||
AddIntegration("DruidManaBarBackground", function()
|
||||
if C.thirdparty.druidmana.enable == "0" then return end
|
||||
DruidManaBar:SetParent(UIParent)
|
||||
DruidManaBar.bd:Hide()
|
||||
|
||||
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
|
||||
DruidManaBar:SetStatusBarColor(pr, pg, pb)
|
||||
DruidManaBar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
|
||||
CreateBackdrop(DruidManaBar)
|
||||
|
||||
DruidManaBar:SetScript("OnMouseUp", function(button)
|
||||
pfUI.uf.player:Click(button)
|
||||
end)
|
||||
|
||||
DruidManaBar:ClearAllPoints()
|
||||
DruidManaBar:SetPoint("CENTER", 0, 0)
|
||||
UpdateMovable(DruidManaBar)
|
||||
end)
|
||||
|
||||
AddIntegration("HealComm", function()
|
||||
-- hook healcomm's addon message to parse single-player events
|
||||
if AceLibrary and AceLibrary:HasInstance("HealComm-1.0") and pfUI.prediction then
|
||||
|
||||
Reference in New Issue
Block a user