Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Sam55555 on April 23, 2014, 05:14:38 AM

Title: Building panel widgets
Post by: Sam55555 on April 23, 2014, 05:14:38 AM
Hi,
i have panel with few widgets on mobile device with anchors. On start you can see how widget move to right position in panel. I show fullscreen loading image to prevent to see this widget moving. How can i detect, that widget rebuild finished?
Title: Re: Building panel widgets
Post by: ArenMook on April 23, 2014, 06:25:54 AM
Just wait until the end of frame.

You can also force an immediate reposition of everything by broadcasting UpdateAnchors.
  1. UIRoot.Broadcast("UpdateAnchors");
You may also need to immediately refresh the panels afterwards though.
  1. UIRoot.Broadcast("Refresh");
Title: Re: Building panel widgets
Post by: Sam55555 on April 23, 2014, 06:49:09 AM
I waited to the end of frame, but on slow mobile phones (Galaxy S) that takes more than one frame. I see how every widget jump to position and that takes 2-7 seconds.
Title: Re: Building panel widgets
Post by: ArenMook on April 23, 2014, 06:58:06 AM
All anchors are updated in Update(). There is no delay, so I am not sure what you're seeing there. 2 to 7 seconds? What are you anchored to?
Title: Re: Building panel widgets
Post by: Sam55555 on April 23, 2014, 07:03:51 AM
Fullscreen background anchored to panel and other widgets anchored to background widget.
Title: Re: Building panel widgets
Post by: ArenMook on April 23, 2014, 07:43:05 AM
Are you using the built-in anchors, or the old style UIAnchor?
Title: Re: Building panel widgets
Post by: Sam55555 on April 23, 2014, 08:11:32 AM
only build-in anchors
Title: Re: Building panel widgets
Post by: ArenMook on April 24, 2014, 12:34:21 AM
Then I honestly don't see a reason for that behaviour.