Hello Guest

Author Topic: Snapping Scrollable Area?  (Read 4662 times)

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Snapping Scrollable Area?
« on: November 07, 2013, 01:19:04 pm »
Is this easy to achieve? What I mean by "snapping" is like the pages on iOS home screen for example. You swipe to scroll to the next segment, rather than it scroll like a contacts list or a website.  Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Snapping Scrollable Area?
« Reply #1 on: November 07, 2013, 06:47:06 pm »
Its in the roadmap, but not implemented yet. If you want to do it yourself, you can modify the tk2dUIScrollableArea.BackgroundOverUpdate function - that is what does the inertial scrolling, you can get it to snap to positions there.

AndyJ710

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Snapping Scrollable Area?
« Reply #2 on: January 13, 2014, 07:33:01 pm »
Please please, am I dying to get a snapping scrollable area. Nothing else on the Asset Store really works like that. At least not along with the other features you have already put here. I really want to use a snapping scrollable area for my main world select screen.

Around when would you expect this to be implemented?

Thank you!

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Snapping Scrollable Area?
« Reply #3 on: January 13, 2014, 07:42:12 pm »
I ended up adding it in myself as unikron metioned in the tk2dUIScrollableArea.BackgroundOverUpdate function. I don't have access to the code at the moment, but doing checks on 'destValue' and setting that to what you want should do the trick.

AndyJ710

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Snapping Scrollable Area?
« Reply #4 on: January 13, 2014, 08:27:23 pm »
Thanks for the tip. I am still super new to this programming stuff but I will certainly try some if statement using that. Thank you!