- 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

@ -99,6 +99,9 @@ function PetMana.prototype:Update(unit)
end
local color = "PetMana"
if (self.moduleSettings.scaleManaColor) then
color = "ScaledManaColor"
end
if not (self.alive) then
color = "Dead"
else
@ -116,6 +119,31 @@ function PetMana.prototype:Update(unit)
end
-- OVERRIDE
function PetMana.prototype:GetOptions()
local opts = PetMana.super.prototype.GetOptions(self)
opts["scaleManaColor"] = {
type = "toggle",
name = "Color bar by mana %",
desc = "Colors the mana bar from MaxManaColor to MinManaColor based on current mana %",
get = function()
return self.moduleSettings.scaleManaColor
end,
set = function(value)
self.moduleSettings.scaleManaColor = value
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 51
}
return opts
end
-- Load us up
IceHUD.PetMana = PetMana:new()