Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Multiplayer on January 05, 2014, 10:23:55 AM

Title: Depth ordering of NGUI labels and non-NGUI-elements
Post by: Multiplayer on January 05, 2014, 10:23:55 AM
Hi

I am trying to build a menu mainly from game elements, mostly ragesplines, rather than NGUI sprites. But there does not seem to be a way to place labels reliably behind non-NGUI-elements. Depth ordering, z-ordering, it all seems to work for a moment and then breaks the moment I insert the next label. The most I have managed to do (reliably) is to place either all text on top of everything else or behind everything else. Even placing every label in its own panel and assigning different fonts does not seem to help.

What I am looking for is something like this:
label on top of graphic on top of label on top of graphic on top of label

(http://s7.directupload.net/images/140105/temp/ot357g2y.png) (http://s7.directupload.net/file/d/3493/ot357g2y_png.htm)

I have been trying this for a day now and searching in the forums, since I thought it was to simple a thing to ask, but it just wont work. Is there any way to properly do this with NGUI? I only need it for the main menu animations, so even if it means there will be a draw call for every label I can live with that.
Title: Re: Depth ordering of NGUI labels and non-NGUI-elements
Post by: ArenMook on January 05, 2014, 10:47:07 AM
NGUI's draw calls are created and ordered using widget's depth. If you have 3 labels under the same panel, all 3 will end up in the same draw call. NGUI doesn't know anything about non-NGUI objects, and will not split up draw calls for you like it will if you use NGUI elements.

You can't mix NGUI with a completely different system.
Title: Re: Depth ordering of NGUI labels and non-NGUI-elements
Post by: Multiplayer on January 05, 2014, 11:54:17 AM
OK thanks, I will try to make do without it.