View Single Post
Old 05-27-11, 02:17 PM   #10
Sauerkraut
A Cyclonian
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 46
Again way over my head. I am amazed anything I write even works. Anyhow using PostUpdate works and seems to be doing exactly what I needed.

Code:
local PostUpdatePower = function(Power, unit, min, max)
	local _, ptype = UnitPowerType("player")
        if(oUF.colors.power[ptype]) then
		r, g, b = unpack(oUF.colors.power[ptype])
	end
	Power.arrow:SetVertexColor(r, g, b)
end
Code:
		s.PostUpdate = PostUpdatePower
It may not be the most elegant or the best way to do it, but it seems to work.
Sauerkraut is offline   Reply With Quote