2D Toolkit Forum

2D Toolkit => Support => Topic started by: fsadeq on November 07, 2013, 01:19:04 pm

Title: Snapping Scrollable Area?
Post by: fsadeq 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.
Title: Re: Snapping Scrollable Area?
Post by: unikronsoftware 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.
Title: Re: Snapping Scrollable Area?
Post by: AndyJ710 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!
Title: Re: Snapping Scrollable Area?
Post by: fsadeq 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.
Title: Re: Snapping Scrollable Area?
Post by: AndyJ710 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!