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:
@ -84,6 +84,23 @@ function TargetHealth.prototype:GetOptions()
|
||||
end,
|
||||
order = 42
|
||||
}
|
||||
|
||||
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 = 43
|
||||
}
|
||||
|
||||
return opts
|
||||
end
|
||||
@ -137,6 +154,10 @@ function TargetHealth.prototype:Update(unit)
|
||||
self.color = self.unitClass
|
||||
end
|
||||
|
||||
if (self.moduleSettings.scaleHealthColor) then
|
||||
self.color = "ScaledHealthColor"
|
||||
end
|
||||
|
||||
if (self.tapped) then
|
||||
self.color = "Tapped"
|
||||
end
|
||||
|
Reference in New Issue
Block a user