Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: swogdog on July 21, 2015, 05:41:56 PM

Title: Center On Child/Click, but to a side instead?
Post by: swogdog on July 21, 2015, 05:41:56 PM
I have a clipping panel with a grid of objects underneath it.  It's working fine, and Center On Click/Child is working, but the only option it seems is that it centers the child in the very middle of the clipping box.  I thought if maybe I move the panel's positions and adjust the clipping box offset, maybe it was centering to the pivot of the Panel, but I still get the same result.  So I assume it dynamically figures out the center of the clipping box?  Basically I want to be able to have it not really center on click, but move to the top on click.  Is this possible without any/much coding?
Title: Re: Center On Child/Click, but to a side instead?
Post by: ArenMook on July 24, 2015, 10:03:20 AM
Well, it does say Center. If you want to add an offset there, the easiest thing to do is to add it to your child elements. Remember, the panel will use it's center, but the children can have their own offset like so:

Scroll View
- Offset
-- Item
- Offset
-- Item
- Offset
-- Item