Author Topic: [SOLVED] Keep Dragging an UIDragObject  (Read 4449 times)

PabloAM

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 58
    • View Profile
[SOLVED] Keep Dragging an UIDragObject
« on: March 27, 2013, 08:48:35 AM »
Hello everyone,
I´m having troubles trying to keep dragging an UIDragObject, If I get out from its collider the object stops, But in the example  6 "Draggable Window", you can move the coursor whatever you want and dont stop to move.

What can I do that?

Thanks!
« Last Edit: March 28, 2013, 04:15:34 AM by PabloAM »

PabloAM

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 58
    • View Profile
Re: Keep Dragging an UIDragObject
« Reply #1 on: March 28, 2013, 04:03:35 AM »
Hello again, I think this could be fixed activating "Sticky Press" on UICamera, but I can´t found how activate it on run time.

How could I activate it?
Thanks again.

EDITED:
I have done a little hack on NGUI.
To change stickPress on Run time just change the variable stickyPress on UICamera.cs (Line: 116) and add the function as the follow code:
  1. static public bool stickyPress = false;
  2.        
  3.         static public void changeStickTo(bool b)
  4.         {
  5.                 stickyPress = b;
  6.         }
  7.  

You now can change sticky Press with UICamera.changeStickTo(true);

Enjoy it!
« Last Edit: March 28, 2013, 04:14:56 AM by PabloAM »