Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-13-15, 02:06 PM   #1
Soulcleaver
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 65
KGpanels target color script help!

Hi, im making an ui and i want my target panel to be hostile colored.. aka "faction colored" and class color if its a friendly target :P my script only uses class color but i need help to make it better:P

on load:

self:RegisterEvent("PLAYER_TARGET_CHANGED")

on event:

if UnitExists("target") then
local _, Class = UnitClass("target")
local Color = RAID_CLASS_COLORS[Class] or {r = 1, g = 1, b = 1}
self.bg:SetVertexColor(Color.r, Color.g, Color.b, self.bg:GetAlpha())
end

Any help appriciated
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » KGpanels target color script help!


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off