Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: vexe on August 26, 2013, 12:57:16 PM
-
Hello, in the NGUI scroll view example, the one with the clipping panel. There's a lot of panels used. One for the clipped view, one for the main window, and one inside the main window, for the scroll bar. I just wonder why? - when and when should I do that?
can't everything fit in one panel? - what's the benefits of using separate panels? and how should I decide on how to separate them? - Thanks a lot.
-
Each panel batches widgets underneath. When widgets change, everything must be re-batched. This is why the scroll bar is on its own panel -- so that when it changes (which happens every frame) it doesn't force the entire window to be redrawn. Clipped panel has its own panel because the elements inside must be clipped.