Author Topic: Draggable Interface: iPhone Home Style  (Read 2009 times)

kaz2057

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
Draggable Interface: iPhone Home Style
« 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

steddyman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: Draggable Interface: iPhone Home Style
« Reply #1 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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Interface: iPhone Home Style
« Reply #2 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

kaz2057

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
Re: Draggable Interface: iPhone Home Style
« Reply #3 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!