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