Could use some quick help with this:
Been attempting to convert my health function to tags, this is only a part of it:
Code:
oUF.Tags['[health]'] = function(unit)
if unit == 'player' then
return (UnitHealthMax(unit) > UnitHealth(unit)) and '|cffaf5050'..oUF.Tags['[curhp]'](unit)..'|r' or '|cff559655'..oUF.Tags['[maxhp]'](unit)..'|r'
elseif unit == 'target' then
return (UnitHealthMax(unit) > UnitHealth(unit)) and '|cffaf5050'..oUF.Tags['[shorthealth]'](unit)..'|r' or '|cff559655'..oUF.Tags['[shorthealth]'](unit)..'|r'
else
return (UnitHealthMax(unit) > UnitHealth(unit)) and '' or '|cff559655'..oUF.Tags['[shorthealth]'](unit)..'|r'
end
end
The only thing i didn't manage to convert is my gradient for texts:
Code:
r, g, b = self.ColorGradient(min/max, 0.69, 0.31, 0.31, 0.65, 0.63, 0.35, 0.33, 0.59, 0.33)
Static colors are quite simple but what about a gradient, how ?