Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: xiexbmu on December 05, 2012, 01:30:30 AM

Title: Can make a change that UILabel or UIWidget support multi-materials?
Post by: xiexbmu on December 05, 2012, 01:30:30 AM
Hi,there :)
Now UILabel only supports one material,so if I want to make such as Chinese font texture to more than one texture,I cannot find a way to switch the different textures quickly.And yes,maybe I can switch the texture by setting the only material,but it has a performance hit.
So may I ask:Can you ArenMook support multi-materials for UIWidget?

Thanks,:)
Harry
Title: Re: Can make a change that UILabel or UIWidget support multi-materials?
Post by: lime-green.at on December 05, 2012, 01:37:51 AM
In your Bitmap-Font generator (i use bmfont) you can set the width and height of the output image:
(http://s3.imgimg.de/uploads/Capture744cddafPNG.png)

To check if the font bitmap needs a bigger size, just check all your characters and then go to Options -> Visualize, in that new window title you now can see something like "Preview: 1/2", then just choose a bigger size and check again.

Regards
Title: Re: Can make a change that UILabel or UIWidget support multi-materials?
Post by: xiexbmu on December 05, 2012, 01:49:06 AM
Hi, axm0nky.  Thanks for your advise,it's helpful.:)
But what we worried is that we cannot put so many characters in only one texture,no matter how the texture big is.
Thanks, :)
Harry
Title: Re: Can make a change that UILabel or UIWidget support multi-materials?
Post by: ArenMook on December 05, 2012, 02:58:59 AM
You can't have more than one texture used by the font. If you can't fit all the glyphs into one font texture, look into the packed font feature. You can fit 4 times the characters into one texture that way. There is a video on it.
Title: Re: Can make a change that UILabel or UIWidget support multi-materials?
Post by: xiexbmu on December 05, 2012, 04:05:14 AM
Hi,ArenMook.Thanks very much!
And I'll try it. :)
Harry.