Author Topic: iphone style scrolling  (Read 2661 times)

Bob JJ

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
iphone style scrolling
« 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.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: iphone style scrolling
« Reply #1 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: iphone style scrolling
« Reply #2 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.