Commit 20f51c8c authored by Azilroka's avatar Azilroka
Browse files

Np: Charged Combo Point

parent 30cb1b46
......@@ -39,7 +39,7 @@ function NP:ClassPower_UpdateColor(powerType)
end
end
function NP:ClassPower_PostUpdate(Cur, _, needUpdate)
function NP:ClassPower_PostUpdate(Cur, _, needUpdate, _, chargedIndex)
if Cur and Cur > 0 then
self:Show()
else
......@@ -49,6 +49,13 @@ function NP:ClassPower_PostUpdate(Cur, _, needUpdate)
if needUpdate then
NP:Update_ClassPower(self.__owner)
end
if chargedIndex then
local r, g, b = unpack(NP.db.colors.chargedComboPoint)
self[chargedIndex]:SetStatusBarColor(r, g, b)
self[chargedIndex].bg:SetVertexColor(r * .35, g * .35, b * .35)
end
end
function NP:Construct_ClassPower(nameplate)
......
......@@ -133,12 +133,7 @@ function UF:Configure_ClassBar(frame)
bars[i].bg:SetVertexColor(r * mu, g * mu, b * mu)
end
else -- Combo Points for everyone else
local r1, g1, b1 = unpack(ElvUF.colors.ComboPoints[1])
local r2, g2, b2 = unpack(ElvUF.colors.ComboPoints[2])
local r3, g3, b3 = unpack(ElvUF.colors.ComboPoints[3])
local maxComboPoints = ((MAX_CLASS_BAR == 10 and 10) or (MAX_CLASS_BAR > 5 and 6 or 5))
bars[i]:SetStatusBarColor(ElvUF:ColorGradient(i, maxComboPoints, r1, g1, b1, r2, g2, b2, r3, g3, b3))
bars[i]:SetStatusBarColor(unpack(ElvUF.colors.ComboPoints[i]))
end
if frame.CLASSBAR_DETACHED and db.classbar.verticalOrientation then
......
......@@ -570,6 +570,7 @@ P.nameplates = {
[13] = {r = 025/255, g = 147/255, b = 072/255}, -- BATTLEGROUND_FRIENDLY_PVP
},
classResources = {
chargedComboPoint = { r = 0.1647, g = 0.6353, b = 1.0 },
comboPoints = {
[1] = {r = .69, g = .31, b = .31},
[2] = {r = .65, g = .42, b = .31},
......
......@@ -6668,6 +6668,23 @@ E.Options.args.nameplate = {
}
ORDER = 10
E.Options.args.nameplate.args.generalGroup.args.colorsGroup.args.classResources.args.chargedComboPoint = {
order = 17,
type = 'color',
name = L["Charged Combo Point"],
get = function()
local t = E.db.nameplates.colors.classResources.chargedComboPoint
local d = P.nameplates.colors.classResources.chargedComboPoint
return t.r, t.g, t.b, t.a, d.r, d.g, d.b
end,
set = function(_, r, g, b)
local t = E.db.nameplates.colors.classResources.chargedComboPoint
t.r, t.g, t.b = r, g, b
NP:ConfigureAll()
end,
}
for i = 1, 6 do
E.Options.args.nameplate.args.generalGroup.args.colorsGroup.args.classResources.args['CHI_POWER' .. i] = {
type = 'color',
......
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