Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: heliosprime on April 05, 2013, 02:30:11 AM
-
I have a panel that has been made draggable. How do I keep the panel from being allowed to be dragged offscreen? I'd like to enforce the panel to always have at least X pixels onscreen. Ideally, if it is dragged too far, I'd like to have it spring back on screen within the set bounds. I can't seem to figure out where in the UIDraggablePanel script to check the bounds.
Thanks in advance for any hints.
-
There is a bool on the inspector which is 'keep inside bounds' or something. If that is ticked then the contents will stay within the clipping area of the panel (must be clipped)