View Single Post
03-21-10, 07:24 AM   #187
Lordyfrb
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 71
Threat Based Colored Panels

Hi guys, just wondering if anyone could help me.

I'm trying to create a panel that starts black, and then changes color when in combat to show my threat level.

I've found the API used for this: API GetThreatStatusColor()

I so far have this:
Code:
{	name="Stuf.Player.Frame.BG",
	parent="Stuf.units.player",
	anchor_to="center", anchor_to="center",
	width=256, height=32,
	bg_color="0 0 0", bg_alpha=1,
	OnUpdate = function(self)
		local r, g, b = GetThreatStatusColor(status)
		self.bg:SetTexture(r, g, b, 1)
	end,
},
Thanks for any help.
Lordy.
  Reply With Quote