Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: beermoney on October 28, 2014, 06:47:09 AM

Title: color gradient sprites
Post by: beermoney on October 28, 2014, 06:47:09 AM
didn't want to bring this thread back to life...
http://www.tasharen.com/forum/index.php?topic=8918.0
but...
I think gradient sprites would be very useful! I disagree that adding it to uisprite would clutter the inspector, I'd imagine a simple check box to disable/hide the gradient if it's not used.  It would be immensely useful in allowing variation to UIs while keep the atlas size to a minimum.
Title: Re: color gradient sprites
Post by: yuewah on October 28, 2014, 10:41:26 AM
+1
Title: Re: color gradient sprites
Post by: bac9 on October 28, 2014, 11:05:44 AM
You can simply add a semi-transparent overlay sprite to create a gradient of any shape over your widget. Far more flexible than attempting to influence vertex colors directly (which won't even work properly with a sliced sprite without end-to-end edges).
Title: Re: color gradient sprites
Post by: beermoney on October 28, 2014, 03:22:29 PM
I don't think an overlayed component is going to do any favours to fill rate, also what if the thing I want to gradient has alpha in it?, the gradient would be applied to anything behind it, thanks for the suggestion tho
Title: Re: color gradient sprites
Post by: ArenMook on October 29, 2014, 05:17:46 AM
Just create a custom widget that does this in the OnFill function.