Commit b7d10f74 authored by Azilroka's avatar Azilroka
Browse files

Additional Power doesn't exist in ElvUI. It's handled by Class Power

parent 176fecb7
......@@ -10,20 +10,10 @@ function UF:Construct_PowerPrediction(frame)
mainBar:SetStatusBarTexture(E["media"].blankTex)
mainBar:Hide()
local PowerPrediction = {
return {
mainBar = mainBar,
parent = frame
}
if frame.AdditionalPower then
local altBar = CreateFrame('StatusBar', nil, frame.AdditionalPower)
altBar:SetStatusBarTexture(E["media"].blankTex)
altBar:Hide()
PowerPrediction.altBar = altBar
end
return PowerPrediction
end
function UF:Configure_PowerPrediction(frame)
......@@ -34,7 +24,7 @@ function UF:Configure_PowerPrediction(frame)
frame:EnableElement('PowerPrediction')
end
local mainBar, altBar = powerPrediction.mainBar, powerPrediction.altBar
local mainBar = powerPrediction.mainBar
local reverseFill = frame.db.power.reverseFill
local r, g, b = frame.Power:GetStatusBarColor()
......@@ -50,22 +40,6 @@ function UF:Configure_PowerPrediction(frame)
mainBar:SetReverseFill(true)
mainBar:SetPoint('RIGHT', frame.Power:GetStatusBarTexture(), 'RIGHT')
end
if altBar then
r, g, b = frame.AdditionalPower:GetStatusBarColor()
altBar:SetPoint('TOP')
altBar:SetPoint('BOTTOM')
altBar:SetWidth(frame.AdditionalPower:GetWidth())
altBar:SetStatusBarColor(r * 1.25, g * 1.25, b * 1.25)
if reverseFill then
altBar:SetReverseFill(false)
altBar:SetPoint('LEFT', frame.AdditionalPower:GetStatusBarTexture(), 'LEFT')
else
altBar:SetReverseFill(true)
altBar:SetPoint('RIGHT', frame.AdditionalPower:GetStatusBarTexture(), 'RIGHT')
end
end
else
if frame:IsElementEnabled('PowerPrediction') then
frame:DisableElement('PowerPrediction')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment