2D Toolkit Forum

2D Toolkit => Support => Topic started by: wendigo on February 04, 2014, 05:31:39 pm

Title: Help with ScrollableArea and SetScrollPercentWithoutEvent
Post by: wendigo on February 04, 2014, 05:31:39 pm
Hi, I want a menu similar to Angry Birds StarWars (planets). I have setup the component and the scroll works fine. My problem is that I don't know how can I do that a near element of the ScrollableArea going to the center when it is near of the center smoothly. I am using SetScrollPercentWithoutEvent but the process is inmediate.

Could someone help me, please?

Thanks in advance.
Title: Re: Help with ScrollableArea and SetScrollPercentWithoutEvent
Post by: unikronsoftware on February 05, 2014, 10:46:24 am
If you're talking about snapping to items in a list - that feature is on the roadmap but isn't implemented yet. You'll have to implement it yourself - the best place to do so is tk2dUIScrollableArea.BackgroundOverUpdate(). If you do it from external code, you won't have sufficient information and/or will conflict with the internal behaviour.
Title: Re: Help with ScrollableArea and SetScrollPercentWithoutEvent
Post by: wendigo on February 05, 2014, 11:49:02 am
If you're talking about snapping to items in a list - that feature is on the roadmap but isn't implemented yet. You'll have to implement it yourself - the best place to do so is tk2dUIScrollableArea.BackgroundOverUpdate(). If you do it from external code, you won't have sufficient information and/or will conflict with the internal behaviour.

Thanks for the information. I'll try it.

The effect is like this:
http://gameassets.net/?p=10