Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: capitalj on June 07, 2012, 12:15:04 PM

Title: Mixing fonts and atlases
Post by: capitalj on June 07, 2012, 12:15:04 PM
Hi,

Can we mix fonts and sprite atlases on one panel? ie: can I grab a font from Atlas A and a button from Atlas B? I've done it before but now I'm having the layer ordering give me problems where I can't move one of those above the other (so my text shows up underneath my button, etc..)

-JJ
Title: Re: Mixing fonts and atlases
Post by: ryan on June 07, 2012, 01:30:58 PM
You can mix them, but the panel can't use the widget depths to sort them if they're in different atlases.  (The panel combines everything from one atlas into one draw call, everything from the next atlas into another draw call, etc.)  You'll need to give your label a smaller Z position than the button to bring it closer to the camera, to get the font draw call to render on top of the button draw call.
Title: Re: Mixing fonts and atlases
Post by: capitalj on June 07, 2012, 02:07:44 PM
Ah, ok thanks for the help!