Amended 29dc1b89 to be controlled by its own option

Instead of changing a behavior that's years old out from under people, let's make it opt-in.
This commit is contained in:
Parnic
2016-09-05 21:50:43 -05:00
parent 7ec918ecb6
commit 0c729d77e9

View File

@ -100,6 +100,27 @@ end
order = 53 order = 53
} }
opts["scaleManaColorForAll"] = {
type = "toggle",
name = L["Scale for non-mana users"],
desc = L["Uses the 'color bar by mana %' setting/colors even for classes that don't use Mana"],
width = 'double',
get = function()
return self.moduleSettings.scaleManaColorForAll
end,
set = function(info, value)
self.moduleSettings.scaleManaColorForAll = value
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
hidden = function()
return not self.moduleSettings.scaleManaColor
end,
order = 53.1
}
return opts return opts
end end
@ -284,7 +305,7 @@ function PlayerMana.prototype:Update(unit, powertype)
local color = "PlayerMana" local color = "PlayerMana"
if not (self.alive) then if not (self.alive) then
color = "Dead" color = "Dead"
elseif (self.moduleSettings.scaleManaColor) then elseif (self.moduleSettings.scaleManaColor and (UnitPowerType(self.unit) == SPELL_POWER_MANA or self.moduleSettings.scaleManaColorForAll)) then
color = "ScaledManaColor" color = "ScaledManaColor"
else else
if (self.manaType == SPELL_POWER_RAGE) then if (self.manaType == SPELL_POWER_RAGE) then