- bump toc

- added the ability to scale most health/power bars by the amount they're filled up with a customizable max/min color (health can go green to red, for example)
- updated from SharedMedia-1.0 to LibSharedMedia-2.0
This commit is contained in:
Parnic
2008-01-19 01:26:18 +00:00
parent 73470f7b34
commit ced858b06a
9 changed files with 193 additions and 8 deletions

View File

@ -80,6 +80,23 @@ function PlayerHealth.prototype:GetOptions()
end,
order = 41
}
opts["scaleHealthColor"] = {
type = "toggle",
name = "Color bar by health %",
desc = "Colors the health bar from MaxHealthColor to MinHealthColor based on current health %",
get = function()
return self.moduleSettings.scaleHealthColor
end,
set = function(value)
self.moduleSettings.scaleHealthColor = value
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 42
}
return opts
end
@ -103,6 +120,10 @@ function PlayerHealth.prototype:Update(unit)
color = self.unitClass
end
if (self.moduleSettings.scaleHealthColor) then
color = "ScaledHealthColor"
end
if not (self.alive) then
color = "Dead"
end