mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- converted upper/lower text on most bars to use LibDogTag formatting for greater user control
- added Deformat library references in embeds.xml
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
local AceOO = AceLibrary("AceOO-2.0")
|
||||
local DogTag = AceLibrary("LibDogTag-2.0")
|
||||
|
||||
local TargetHealth = AceOO.Class(IceUnitBar)
|
||||
|
||||
@ -17,11 +18,15 @@ end
|
||||
|
||||
function TargetHealth.prototype:GetDefaultSettings()
|
||||
local settings = TargetHealth.super.prototype.GetDefaultSettings(self)
|
||||
|
||||
settings["side"] = IceCore.Side.Left
|
||||
settings["offset"] = 2
|
||||
settings["mobhealth"] = (MobHealth3 ~= nil)
|
||||
settings["classColor"] = false
|
||||
settings["hideBlizz"] = true
|
||||
settings["upperText"] = "[PercentHP:Round]"
|
||||
settings["lowerText"] = "[FractionalHP:Color(00ff00):Bracket]"
|
||||
|
||||
return settings
|
||||
end
|
||||
|
||||
@ -163,6 +168,7 @@ function TargetHealth.prototype:Update(unit)
|
||||
end
|
||||
|
||||
self:UpdateBar(self.health/self.maxHealth, self.color)
|
||||
--[[
|
||||
self:SetBottomText1(self.healthPercentage)
|
||||
|
||||
|
||||
@ -182,6 +188,14 @@ function TargetHealth.prototype:Update(unit)
|
||||
else
|
||||
self:SetBottomText2()
|
||||
end
|
||||
]]
|
||||
|
||||
if self.moduleSettings.upperText ~= nil and self.moduleSettings.upperText ~= '' then
|
||||
self:SetBottomText1(DogTag:Evaluate("target", self.moduleSettings.upperText))
|
||||
end
|
||||
if self.moduleSettings.lowerText ~= nil and self.moduleSettings.lowerText ~= '' then
|
||||
self:SetBottomText2(DogTag:Evaluate("target", self.moduleSettings.lowerText))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user