Thread Tools Display Modes
01-10-13, 10:13 AM   #1
Billtopia
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 110
Coloring standard buttons

What is the best way ( or is there more than one ) to change a buttons color from the standard WoW red to green (or whatever) if the option it toggles is enabled or not... For example I have a list of people that is generated from the real-id / battle-tag friends list. The addon puts asterisks around the names that it is selected to alert for... I was wondering if I could change the button colors as well to make it easier to differentiate the enabled ones from the non-enabled? I searched the web and here but I don't think I found what I was looking for...
  Reply With Quote
01-10-13, 04:31 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
The button you are seeing isn't colored at all (well, technically, it's colored white). It's a texture. If you try to color it green, it will turn into some greenish-red color.

You can... change the color of the text on the button, change the texture of the button, or use some other method to display your info. (edit: unless you want the greenish-red color)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-10-13, 04:40 PM   #3
Billtopia
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 110
OK... that is what I feared... lol I guess I will have to figure a way to change the textures when I update the text on them (it is a virtual scrolling list that activates and deactivates alerts on a per real-id / battle-tag basis) I suppose it is about time I figured out some more advanced stuff lol
  Reply With Quote
01-12-13, 08:40 PM   #4
Billtopia
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 110
ok... so I have these nice green button textures... (recolored red ones from wow) and they do not cover the whole button, and I cant tell wow to SetTexCoord them as they are set by SetPushedTexture, SetNormalTexture, SetHighlightTexture...

So, what am I missing...
  Reply With Quote
01-12-13, 08:41 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
frame:GetNormalTexture():SetTexCoord(a,b,c,d)
__________________
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
01-12-13, 08:43 PM   #6
Billtopia
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 110
sweet... you are a WoW Lua GOD and I kneel at your feet
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Coloring standard buttons


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