Welcome,
Guest
. Please
login
or
register
.
October 03, 2024, 05:51:11 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UIScrollView UpdatePosition
« previous
next »
Print
Pages: [
1
]
Author
Topic: UIScrollView UpdatePosition (Read 1816 times)
jingato
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 15
UIScrollView UpdatePosition
«
on:
May 20, 2014, 02:59:08 PM »
Hi, I just updated to the latest NGUI and noticed my scrollviews were no longer acting as normal. Looking at the code it looks like you aded additional conditions on the UpdatePosition function that requires it to have a scrollbar.
public
void
UpdatePosition
(
)
{
if
(
!
mIgnoreCallbacks
&&
(
horizontalScrollBar
!=
null
||
verticalScrollBar
!=
null
)
)
{
}
}
I was wondering why you added this condition and if there is something else we should now be using to update the position or if I should remove this condition.
Thanks
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UIScrollView UpdatePosition
«
Reply #1 on:
May 20, 2014, 04:20:59 PM »
It's a function that gets called by scroll bars, which is why the check is there. I believe the check was added because it's also used in UIPanel.baseClipRegion, and it doesn't reset the position properly at edit time otherwise.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UIScrollView UpdatePosition