Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: xiaoniaojjj on January 20, 2014, 08:56:26 AM
-
1. How to know whether the scrollview is reached the left or right border when move finished?
2. How to do the UILeftOnChild like UICenterOnChild?
Maybe the picture can help you understand me!
-
Help me!!!!!!!!!
-
1. Just math. Look at how UIPanel.ConstrainTargetToBounds works.
2. I don't know what UILeftOnChild is or what you intend it to be, but my guess is watch UICenterOnChild.centeredObject. When it changes, do your thing.
-
Thanks for the reply, Maybe the picture can help you to understand me about second question!
-
Help me!!!!
-
Help him!!!! PLEASE ARENMOOK DO IT
-
Help me!!!!!
-
Posting "help me!!!" does nothing. I see all posts that I haven't answered, and do it in order when I do my daily support run.
To do what you're trying to do, you need to write your own logic. UICenterOnChild centers on a child, as simple as that. If you want there to be code that prevents going to the last child, and instead diverts to the second last, then modify UICenterOnChild/UICenterOnClick script to do just that.
NGUI's source code is yours to modify for a reason.