View Single Post
03-17-09, 02:04 AM   #901
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
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 ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 03-17-09 at 03:11 AM.