Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Bob JJ on July 03, 2014, 01:15:43 PM

Title: iphone style scrolling
Post by: Bob JJ on July 03, 2014, 01:15:43 PM
Making a game for the ipad and the iphone and we do not want to add the ui drag scrollview script to EVERY element added into the game to allow them to drag the scrollview. The scrollview takes up the entire iphone and allows many panels to scroll inside it.

I was thinking of getting the mousedown of the camera and using this to set the scrollview y position but have no idea how to get the scrollview y position or set it, Any help would be great thanks.
Title: Re: iphone style scrolling
Post by: Nicki on July 04, 2014, 03:24:54 AM
Take a look inside the Drag Scrollview script and see what it actually sends on to the scrollpanel, then you just need to send the same information.
Title: Re: iphone style scrolling
Post by: ArenMook on July 04, 2014, 02:04:04 PM
You can also overlay an invisible widget with a collider over your scroll view (ALT+SHIFT+W, ALT+SHIFT+C), and put the drag script onto that instead. The downside is that you won't be able to click on things inside the scroll view unless you explicitly forward such events yourself.