Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: nah0y on November 16, 2012, 09:16:29 AM

Title: UITable construction "hide"
Post by: nah0y on November 16, 2012, 09:16:29 AM
Hi !

Is there a way to hide everything in a UITable before the Reposition is complete for example ?
Right now, I have 2-3 frames were you can see that everything is misplaced and then perfect :(
Title: Re: UITable construction "hide"
Post by: sintua on November 16, 2012, 10:14:10 AM
I haven't tried it, but I believe you can loads them inactive (so they are not seen), adjust them (they should still have their shape you can see in the scene view), then loop through and turn them back on? Not sure if you'd see them all turning back on one at a time or not, though.
Title: Re: UITable construction "hide"
Post by: nah0y on November 16, 2012, 10:18:34 AM
Well, I don't really know how I can load them inactive because I'm instantiating them.
And I think that Reposition does work only on visible objects :(
Title: Re: UITable construction "hide"
Post by: ArenMook on November 16, 2012, 05:51:05 PM
If they're being drawn in the wrong place, then you can try calling a Refresh on the panel, and/or broadcasting "CreatePanel" to your newly instantiated (and parented!) prefabs. You are using NGUITools.AddChild, right?
Title: Re: UITable construction "hide"
Post by: nah0y on November 19, 2012, 06:38:32 AM
Yes I'm using AddChild, don't worry :)

I've tried Refresh but nothing changed, and what's the CreatePanel broadcast you're talking about ? What's used for ?
Title: Re: UITable construction "hide"
Post by: ArenMook on November 19, 2012, 05:24:13 PM
gameObject.Broadcast("CreatePanel");

Ensures that all widgets have registered themselves with their proper panels.