Thread Tools Display Modes
11-25-14, 06:17 PM   #1
Verisnia
A Murloc Raider
Join Date: Mar 2013
Posts: 5
Kgpanels border color script

I've been trying to set a script to change the colour of the panel borders to class colours when I log onto any character (any class). Whenever I first login, the border colour has reset itself to the borders normal colour of white. The script I currently have that is headed in the right direction (sort of, I suppose) is this below.


Lua Code:
  1. local _,class = UnitClass("player")
  2.  
  3. self:SetBackdropBorderColor(RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b)


Am I missing something or just being silly like usual?

Last edited by Verisnia : 11-25-14 at 06:25 PM.
  Reply With Quote
11-26-14, 10:19 PM   #2
Ekaterina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 65
You're on the right track - just add that to kgpanels onload scripts. Although I'd recommend adding a reference to CUSTOM_CLASS_COLORS, just so that you don't have to re-write your scipts if you choose to start altering the class colors.

lua Code:
  1. local _, Class = UnitClass("player")
  2. local Color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[Class]
  3. self:SetBackdopBorderColor(Color.r, Color.g, Color.b)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Kgpanels border color script

Thread Tools
Display Modes

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