Reply
 
Thread Tools Display Modes
Unread 01-10-13, 10:13 AM   #1
Billtopia
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 94
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...
Billtopia is offline   Reply With Quote
Unread 01-10-13, 04:31 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,564
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

Seerah is offline   Reply With Quote
Unread 01-10-13, 04:40 PM   #3
Billtopia
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 94
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
Billtopia is offline   Reply With Quote
Unread 01-12-13, 08:40 PM   #4
Billtopia
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 94
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...
Billtopia is offline   Reply With Quote
Unread 01-12-13, 08:41 PM   #5
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,136
frame:GetNormalTexture():SetTexCoord(a,b,c,d)
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 01-12-13, 08:43 PM   #6
Billtopia
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 94
sweet... you are a WoW Lua GOD and I kneel at your feet
Billtopia is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Lua/XML Help » Coloring standard buttons

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