additional power bar hide
This commit is contained in:
parent
3a6438dd51
commit
7296dd76d9
12
main.lua
12
main.lua
|
@ -17,12 +17,16 @@ local bgColor = {
|
|||
b = 0.1
|
||||
}
|
||||
|
||||
-- PowerBar
|
||||
-- PowerBar & AdditionalPowerBar
|
||||
local function hook_PostUpdatePower(self)
|
||||
self:SetStatusBarColor(color.r, color.g, color.b)
|
||||
self.bg:SetVertexColor(bgColor.r, bgColor.g, bgColor.b)
|
||||
end
|
||||
|
||||
local function hook_PostUpdateAdditionalPower(self)
|
||||
self:Hide()
|
||||
end
|
||||
|
||||
local f = CreateFrame("Frame")
|
||||
f:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
f:SetScript("OnEvent", function(self)
|
||||
|
@ -34,6 +38,11 @@ f:SetScript("OnEvent", function(self)
|
|||
if power then
|
||||
hooksecurefunc(power, "PostUpdate", hook_PostUpdatePower)
|
||||
end
|
||||
|
||||
local apower = unitframe and unitframe.AdditionalPower
|
||||
if apower then
|
||||
hooksecurefunc(apower, "PostUpdate", hook_PostUpdateAdditionalPower)
|
||||
end
|
||||
end)
|
||||
|
||||
-- ClassBar
|
||||
|
@ -51,5 +60,4 @@ local function hook_Configure_ClassBar(self, frame)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
hooksecurefunc(UF, "Configure_ClassBar", hook_Configure_ClassBar)
|
||||
|
|
Loading…
Reference in New Issue