Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: bumblebee on August 13, 2014, 07:46:03 AM

Title: Karaoke Implementation
Post by: bumblebee on August 13, 2014, 07:46:03 AM
I have a task implementing Karaoke for a song and I need to it to look exactly like here: https://www.youtube.com/watch?v=Cgdes6lFjzM

Any idea of how this effect of partial label coloring can be accomplished?
Title: Re: Karaoke Implementation
Post by: ArenMook on August 13, 2014, 08:11:36 AM
You can change color in front of letters by inserting a color tag (like [ff0000]), however you can't insert a color tag in the middle of the letter like it does in the video. If you need it *exactly* like that, then you need to create a custom widget for that.
Title: Re: Karaoke Implementation
Post by: bumblebee on August 13, 2014, 09:11:04 AM
What would you suggest, creating a custom shader of alpha mask somehow?
Title: Re: Karaoke Implementation
Post by: ArenMook on August 14, 2014, 06:47:49 AM
Easiest thing would likely be just to overlay two identical labels on top of each other. One one color, and another the other color. Then add a background-colored sprite in-between of them that would cover one of them. Then you would move this sprite, covering one widget, thus visibly changing the color of the one remaining. Alternative is more difficult and involves a lot of coding.
Title: Re: Karaoke Implementation
Post by: bumblebee on August 14, 2014, 10:11:51 AM
Thank's just doing it with UIPanel with alpha clipping.