Thread Tools Display Modes
04-25-12, 02:02 PM   #1
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Color Textures

Hello,
What I would basicly like to do is take the default blizzard frames with the greyish color and be able to change the color.

Would i have to recreate all the textures or can i just do a overlay?
Would a simple MainMenuBar:SetColor(0,0,0) work?

I came across this when i used the Blizzard dialog border on one of my Panels and did Datatpanel:SetBackdropBorderColor(0,0,0) it made the Dialog border black which made me thing it would be kinda cool to beable to set all the "Grey" borders to what ever color a user wanted, maybe class color, maybe bright yellow who know's.

So if anyone could help me out that would be great.

Thanks
Coke
  Reply With Quote
04-25-12, 03:39 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You don't need to modify the textures or create any additional frames/textures/etc. There are already API methods built into frames and textures for changing their colors

For frames whose visible textures are set as part of their backdrop, you can use:

Code:
frameObject:SetBackdropColor(r, g, b, a)
frameObject:SetBackdropBorderColor(r, g, b, a)
For actual texture objects (like the main menu bar art), you can use:

Code:
textureObject:SetVertexColor(r, g, b, a)
Note that if the texture is already colored (eg. not grayscale) then applying a vertex color may not have the exact results you expect. For example, if a texture is yellow, and you apply a blue vertex color, it will end up looking green.
  Reply With Quote
04-25-12, 04:17 PM   #3
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
You might want to try going a step simpler and using Facepaint.

Phanx -the all knowing - yes that should be above the new-ish avatar - method will work if you want to code it out yourself. I speak from personal experience here, its alot of fun to trial and error your UI so I would totally suggest doing that.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
04-25-12, 08:56 PM   #4
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Unkn View Post
You might want to try going a step simpler and using Facepaint.

Phanx -the all knowing - yes that should be above the new-ish avatar - method will work if you want to code it out yourself. I speak from personal experience here, its alot of fun to trial and error your UI so I would totally suggest doing that.
Thank You I think FacePaint is the way I'm going to go.
  Reply With Quote
04-26-12, 05:53 PM   #5
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Glad it will work for you!
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote

WoWInterface » Developer Discussions » Graphics Help » Color Textures

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