mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- 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:
@ -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()
|
||||
|
Reference in New Issue
Block a user