Author Topic: Panel drag snap  (Read 5399 times)

singh029

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 28
    • View Profile
Panel drag snap
« on: April 17, 2014, 11:34:54 AM »
I want to create a panel drag feature where i can horizontally drag a sprite (thats on the edge of the screen) with a panel child and it will snap to the center of the screen.

I got everything working except the snapping part.
I was trying to make use of the UICenterOnChild script. but the script wouldnt turn on when i attached it to the panel and ran the project.
Do i need to attach it to the panel's parent panel (MainMenuPanel)?
« Last Edit: April 17, 2014, 02:48:16 PM by singh029 »

Redd

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 1
  • Posts: 10
    • View Profile
Re: Panel drag snap
« Reply #1 on: December 18, 2014, 04:52:43 PM »
Look at how it works in the Scroll View (Panel) example.

Scroll View
- UICenter On Child
-- UIDrag Scroll View