View Single Post
03-29-10, 03:32 PM   #4
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
Hi there,

Some code that might be useful for your layout :

Code:
local function Hex(r, g, b)
	if type(r) == 'table' then
		if r.r then r, g, b = r.r, r.g, r.b else r, g, b = unpack(r) end
	end
	return string.format('|cff%02x%02x%02x', r*255, g*255, b*255)
end

oUF.Tags['[shortcurpp]'] = function(u)
local _, powerTypeString = UnitPowerType(u)
return powerTypeString and Hex(oUF.colors.power[powerTypeString])..shorthpval(UnitPower(u)) or shorthpval(UnitPower(u))
end
Didn't test it but should work, as for the health text look for a gradient color (you should find clues on these forums).
  Reply With Quote