Welcome,
Guest
. Please
login
or
register
.
March 23, 2025, 09:18:49 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Building panel widgets
« previous
next »
Print
Pages: [
1
]
Author
Topic: Building panel widgets (Read 2234 times)
Sam55555
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 6
Building panel widgets
«
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?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Building panel widgets
«
Reply #1 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.
UIRoot
.
Broadcast
(
"UpdateAnchors"
)
;
You may also need to immediately refresh the panels afterwards though.
UIRoot
.
Broadcast
(
"Refresh"
)
;
Logged
Sam55555
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 6
Re: Building panel widgets
«
Reply #2 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.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Building panel widgets
«
Reply #3 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?
Logged
Sam55555
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 6
Re: Building panel widgets
«
Reply #4 on:
April 23, 2014, 07:03:51 AM »
Fullscreen background anchored to panel and other widgets anchored to background widget.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Building panel widgets
«
Reply #5 on:
April 23, 2014, 07:43:05 AM »
Are you using the built-in anchors, or the old style UIAnchor?
Logged
Sam55555
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 6
Re: Building panel widgets
«
Reply #6 on:
April 23, 2014, 08:11:32 AM »
only build-in anchors
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Building panel widgets
«
Reply #7 on:
April 24, 2014, 12:34:21 AM »
Then I honestly don't see a reason for that behaviour.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Building panel widgets