Quantcast
WoWInterface - View Single Post - Kgpanels : keeping a panel gradient & classcolored
View Single Post
06-30-12, 02:56 AM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You can either:

1. set your panel's background to use a texture that has a gradient, or

2. set your panel's background to a solid texture and use a different API:

Code:
local _, class = UnitClass("player")
local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class]
local r, g, b = color.r, color.g, color.b
self.bg:SetGradient("VERTICAL", r, g, b, r / 2, g / 2, b / 2)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Donít message me about addon bugs or programming questions.
  Reply With Quote