Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: wallabie on May 19, 2014, 04:05:34 AM

Title: ScrollView CenterOnClick - only within clipping area.
Post by: wallabie on May 19, 2014, 04:05:34 AM
Use Case:

In a scrollView, the user clicks an object that is half way out of the clipping area.  ATM I'm using the CenterOnClick component and it springs the item to the center of the scrollView.  Instead of springing the item all the way to the center, I would like the item to move only a little so that it just inside of the clipping area.  In cases where items are already fully within the clipping area, do not move at all.  How can something be done.

Title: Re: ScrollView CenterOnClick - only within clipping area.
Post by: ArenMook on May 19, 2014, 01:15:15 PM
You wouldn't use UICenterOnChild / UICenterOnClick here. You would write your own component with logic that would only move items into view and not to the center.