Quantcast
XML custom coloring - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-25-10, 02:04 AM   #1
barbol12
A Cyclonian
 
barbol12's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 42
XML custom coloring

ok guys i have my frame all made.. and set. but i cant figure out how to custom color it, not just r,g,b,a but custom char colors(based on char your playing)
heres my stuff......

XML frame
<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>
<Anchors>
<Anchor point="LEFT" relativePoint="BOTTOMLEFT">
<Offset x="3" y="103" />
</Anchor>
</Anchors>
</Frame>
heres a custom color table i made...
function setChat()
local _, class = UnitClass("player")

if class == "WARRIOR" then
chat:SetVertexColor(.5, 0.45, 0.3, 1)
chat:SetBackdropBorderColor(.78, 0.61, 0.43, 1)
elseif class == "PRIEST" then
chat:SetVertexColor(.6, .6, .6, 1)
chat:SetBackdropBorderColor(.1, 1, 1, 1)
elseif class == "DRUID" then
chat:SetVertexColor = (.6, .3, 0, 1)
chat:SetBackdropBorderColor(1, .49, 0.4, 1)
elseif class == "HUNTER" then
chat:SetVertexColor(0.5, .6, 0.3, 1)
chat:SetBackdropBorderColor(0.67, .83, 0.45, 1)
elseif class == "MAGE" then
chat:SetVertexColor(0.3, 0.5, 0.6, 1)
chat:SetBackdropBorderColor(0.41, 0.8, 0.94, 1)
elseif class == "PALADIN" then
chat:SetVertexColor(0.7, 0.4, 0.5, 1)
chat:SetBackdropBorderColor(0.96, 0.55, 0.73, 1)
elseif class == "SHAMAN" then
chat:SetVertexColor(0.1, 0.3, .65, 1)
chat:SetBackdropBorderColor(0, 0.44, .87, 1)
elseif class == "WARLOCK" then
chat:SetVertexColor(0.35, 0.3, .45, 1)
chat:SetBackdropBorderColor(0.58, 0.51, .79, 1)
elseif class == "ROGUE" then
chat:SetVertexColor(.7, .7, 0.3, 1)
chat:SetBackdropBorderColor(1.0, .96, 0.41, 1)
elseif class == "DEATHKNIGHT" then
chat:SetVertexColor(.5, .05, .15, 1)
chat:SetBackdropBorderColor(.77, .12, .23, 1)
end
end
i want to know how i can get those custom colors into my backdrop and backdrop border... also to have it set to be (OnLoad) or something like that... can someone help me finish this thing?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » XML custom coloring

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