Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Tripwire on January 08, 2014, 09:03:00 AM

Title: ScrollView not restting to position
Post by: Tripwire on January 08, 2014, 09:03:00 AM
Hi,

So I have a screen which contains a scrollview. It all works perfectly until i scroll up. The Reset Position is set to (0,251) but the scrollview is resetting itself to (0,283) which makes my UI look bad :(
Title: Re: ScrollView not restting to position
Post by: ArenMook on January 08, 2014, 12:23:47 PM
"Reset Position" value is in relative coordinates (relative to the size of the content). (0, 0) means top-left. (1, 1) means bottom-right.
Title: Re: ScrollView not restting to position
Post by: Tripwire on January 09, 2014, 05:44:35 PM
Thx for your reply Arenmook, but I still can't get this working on any of my ScrollPanels. These are the settings of one of my scroll view panels:
(http://www.plaatjesdump.nl/upload/60a8d19aab9d37d1ae76806b174cc1e7.png)
(http://www.plaatjesdump.nl/upload/d79fdf7800dd10532fa77371eb74a366.png)
Title: Re: ScrollView not restting to position
Post by: ArenMook on January 09, 2014, 06:02:52 PM
How are you resetting your scroll view? The reset position only kicks in when you call ResetPosition(). The actual restricting content within scroll view logic is done based on the dimensions of the content.
Title: Re: ScrollView not restting to position
Post by: Tripwire on January 10, 2014, 04:04:00 AM
How are you resetting your scroll view? The reset position only kicks in when you call ResetPosition(). The actual restricting content within scroll view logic is done based on the dimensions of the content.

Well actually i'm not doing anything with code right now, just making all the screens functional. So i'm not calling anything from the ScrollView.
Title: Re: ScrollView not restting to position
Post by: ArenMook on January 10, 2014, 05:47:47 PM
Ok then I don't quite follow. Scroll view lets you scroll the content until you reach the end of it, at which point it lets you keep scrolling, but with some resistance. Once you release the mouse button/touch, the scroll view will spring into place, hiding any excess space and basically clamping to the edge of the content.
Title: Re: ScrollView not restting to position
Post by: Nicki on January 11, 2014, 06:27:11 AM
You likely have a widget that's going outside the scroll area, like a label's draw area. That would make the scrollview move the content around to make it fit as best it can.

Try checking the sizes of your widgets.