Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: milali on February 20, 2013, 04:39:20 AM

Title: Extending UILabel to swap some text into sprites
Post by: milali on February 20, 2013, 04:39:20 AM
Hi, I am looking to swap some text into sprites in a label block.

i.e.

"Sell (2{gem})"

would swap the {gem} text with a sprite named 'gem'

Has anyone done anything like this already? I am about to do it, one thing I was considering was baking the icons into the font texture... but I am not sure that will work as I will have to manually set the UV's for the icons every time we re-export it... but I guess you don't reexport all that often, so....

Has anyone done anything like this before?
Title: Re: Extending UILabel to swap some text into sprites
Post by: ArenMook on February 20, 2013, 07:11:30 AM
Symbols. There is a video tutorial on how to do this.
Title: Re: Extending UILabel to swap some text into sprites
Post by: milali on February 20, 2013, 07:33:43 AM
SWEET! I'll check it out now
Title: Re: Extending UILabel to swap some text into sprites
Post by: milali on February 21, 2013, 12:04:15 AM
works perfectly!

love your work bud!