Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: hankthewhale on October 04, 2012, 08:45:31 AM

Title: color on button hover is not accurate
Post by: hankthewhale on October 04, 2012, 08:45:31 AM
My button hover is supposed to be a light blue but instead comes out as green which leads me to believe that it's mixing the color of my button with the hover color. Do I have to adjust my material to fix this? I've searched through the forums and it doesn't appear that anyone else had this issue.
Title: Re: color on button hover is not accurate
Post by: yuewah on October 04, 2012, 08:51:05 AM
greyscale image is prefered for tint color
Title: Re: color on button hover is not accurate
Post by: hankthewhale on October 04, 2012, 08:55:02 AM
This makes perfect sense. Can't believe I didn't think of this. Thanks!
Title: Re: color on button hover is not accurate
Post by: hankthewhale on October 04, 2012, 11:30:20 AM
Alright so something I just thought of. My buttons have a white border on them. If I export them as grayscale and tell NGUI to colorize my button orange, it also makes my borders orange. What would be the proper way around this? Should I separate them into two sprites, one for my button and one for the border?
Title: Re: color on button hover is not accurate
Post by: Ferazel on October 04, 2012, 11:48:32 AM
Yeah, the standard shader is a basic multiply tint so white == 100% tint color. The easiest way is to separate the sprites into two elements with different colorization/tint values.
Title: Re: color on button hover is not accurate
Post by: yuewah on October 04, 2012, 12:19:09 PM
as ferazel said, it is the easiest method, otherwise, you need to make a new shader code.
Title: Re: color on button hover is not accurate
Post by: hankthewhale on October 04, 2012, 12:27:30 PM
Alright. Not to big of a deal. Just wanted to make sure that was common in practice and that I wasn't doing something silly.