Quantcast
WoWInterface - View Single Post - XML custom coloring
View Single Post
11-25-10, 09:35 AM   #3
barbol12
A Cyclonian
 
barbol12's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 42
ive tried all that.. but it doesnt seem to work.. i still end up with a white background (the color of the bgfile). ive made all the changes that u said.. heres my new coding...

frame itself... and with the scripting
<Frame name="chat" frameStrata="BACKGROUND" parent="UIParent" visible="true">
<Size>
<AbsDimension x="363" y="147" />
</Size>
<Backdrop bgFile="Interface\Addons\textures\panels.tga"
edgeFile="Interface\Addons\textures\Stripped.tga" tile="false">
<EdgeSize>
<AbsValue val="12"/>
</EdgeSize>
<TileSize>
<AbsValue val="100"/>
</TileSize>
<BackgroundInsets>
<AbsInset left="1" right="1" top="1" bottom="1"/>
</BackgroundInsets>
</Backdrop>
<Scripts>
<OnLoad function="chat_OnLoad" />
</Scripts>
<Anchors>
<Anchor point="LEFT" relativePoint="BOTTOMLEFT">
<Offset x="3" y="103" />
</Anchor>
</Anchors>
</Frame>
Lua coding(with ur changes)
function chat_OnLoad()
local _, class = UnitClass("player")

if class == "WARRIOR" then
chat:SetBackdropColor(.5, 0.45, 0.3, 1)
chat:SetBackdropBorderColor(.78, 0.61, 0.43, 1)
elseif class == "PRIEST" then
chat:SetBackdropColor(.6, .6, .6, 1)
chat:SetBackdropBorderColor(.1, 1, 1, 1)
elseif class == "DRUID" then
chat:SetBackdropColor = (.6, .3, 0, 1)
chat:SetBackdropBorderColor(1, .49, 0.4, 1)
elseif class == "HUNTER" then
chat:SetBackdropColor(0.5, .6, 0.3, 1)
chat:SetBackdropBorderColor(0.67, .83, 0.45, 1)
elseif class == "MAGE" then
chat:SetBackdropColor(0.3, 0.5, 0.6, 1)
chat:SetBackdropBorderColor(0.41, 0.8, 0.94, 1)
elseif class == "PALADIN" then
chat:SetBackdropColor(0.7, 0.4, 0.5, 1)
chat:SetBackdropBorderColor(0.96, 0.55, 0.73, 1)
elseif class == "SHAMAN" then
chat:SetBackdropColor(0.1, 0.3, .65, 1)
chat:SetBackdropBorderColor(0, 0.44, .87, 1)
elseif class == "WARLOCK" then
chat:SetBackdropColor (0.35, 0.3, .45, 1)
chat:SetBackdropBorderColor(0.58, 0.51, .79, 1)
elseif class == "ROGUE" then
chat:SetBackdropColor(.7, .7, 0.3, 1)
chat:SetBackdropBorderColor(1.0, .96, 0.41, 1)
elseif class == "DEATHKNIGHT" then
chat:SetBackdropColor(.5, .05, .15, 1)
chat:SetBackdropBorderColor(.77, .12, .23, 1)
end
end
  Reply With Quote