136
NGUI 3 Support / Re: UIDraggablePanel Deadspace
« on: May 24, 2012, 12:07:27 PM »
I will answer my own question, but I'd like to see if maybe this could be implemented into the full release.
I added a new float to the UICamera called scrollDeadSpace (in my application I set this to 15).
Then in the UICamera ProcessTouch() I added the following conditional
Hopefully, this can be put into the main build and it doesn't cause any significant issues, but so far so good.
I added a new float to the UICamera called scrollDeadSpace (in my application I set this to 15).
Then in the UICamera ProcessTouch() I added the following conditional
- if(currentTouch.totalDelta.magnitude > scrollDeadSpace) {
- currentTouch.pressed.SendMessage("OnDrag", currentTouch.delta, SendMessageOptions.DontRequireReceiver);
- }
Hopefully, this can be put into the main build and it doesn't cause any significant issues, but so far so good.