Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-30-11, 02:01 PM   #1
KepiGio
A Defias Bandit
 
KepiGio's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 2
KGPanels Color by Class Switch ..

Ok tbh i have no idea how to script anything. My main thing i want is to be able to color the background for certain frames by class color have it change on any class you play.

What specific script should i be searching for?

Code:
local _, class = UnitClass("player");
	if class == "WARRIOR" then
        self.bg:SetVertexColor(0.95, 0.23, 0.23, self.bg:GetAlpha())
	elseif class == "PRIEST" then
        self.bg:SetVertexColor(1, 0.96, 0.98, self.bg:GetAlpha())
	elseif class == "MAGE" then
        self.bg:SetVertexColor(0.00, 1, 1, self.bg:GetAlpha())
	elseif class == "DRUID" then
        self.bg:SetVertexColor(1, 0.49, 0.04, self.bg:GetAlpha())
	elseif class == "PALADIN" then
        self.bg:SetVertexColor(0.92, 0.22, 0.46, self.bg:GetAlpha())
	elseif class == "HUNTER" then
        self.bg:SetVertexColor(0.33, 0.86, 0.00, self.bg:GetAlpha())
	elseif class == "ROGUE" then
        self.bg:SetVertexColor(1, 0.94, 0.16, self.bg:GetAlpha())
	elseif class == "SHAMAN" then
        self.bg:SetVertexColor(0.13, 0.42, 1, self.bg:GetAlpha())
	elseif class == "WARLOCK" then
        self.bg:SetVertexColor(0.36, 0.18, 1, self.bg:GetAlpha())
	end
I did find this code laying around here in the forums but the colors are all wrong from what i have in pitbull .. how do i get the color codes to be the exact ones from pitbull?

my colors in pitbull are in the following setting:
DK - c31d3a
Mage - 3ccbf0
Rogue - fff566
Warrior - c79c6d
Druid - ff7e0d
Paladin - f587b7
Shaman -208ade
Hunters - acd375
Priests - b2ebff
Warlocks - 9383c9

Last edited by KepiGio : 01-30-11 at 02:10 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » KGPanels Color by Class Switch ..


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