Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: kaz2057 on February 10, 2013, 02:05:49 PM

Title: Draggable Interface: iPhone Home Style
Post by: kaz2057 on February 10, 2013, 02:05:49 PM
Dear forum,

I open this thread because I try to recreate a draggable panel like iPhone home screen.

The problem is the "lock" and "spring" effects each every page. Actually, draggable panel has spring effects just at then end of entire panel and I cannot find any solution for my request.

Can you help me?

Thanks
Title: Re: Draggable Interface: iPhone Home Style
Post by: steddyman on February 10, 2013, 02:57:36 PM
I have this exact problem too.  Is there any way to make the UITable and Drag Panels act like the native controls in paged mode?

For example I have 12 images each 256x256 laid out side by side and when the user lets go of the mouse it should snap to one of those 256 pixel boundaries.

I can see the SpringPosition script but I'm not sure if there is any way to make the Drag Panel components use it.

Thanks
Title: Re: Draggable Interface: iPhone Home Style
Post by: ArenMook on February 10, 2013, 10:52:19 PM
Why not examine the scroll view example that comes with NGUI? It does the snapping for you when you let go of the button (assuming the checkbox is checked). It's up to you what it snaps to. Paged hierarchy would look like this:

Clipped Panel
- Table/Grid (if you need it)
-- Page 1
--- Widget
--- Widget
--- Widget
-- Page 2
--- Widget
--- Widget
--- Widget
Title: Re: Draggable Interface: iPhone Home Style
Post by: kaz2057 on February 11, 2013, 09:14:38 AM
Thanks Aaron,

what I need for my page slides is the "Center on Child" option to complete my needs!