Hey guys,
I use the "OnDrag" Event Listener to detect when I'm dragging on a UI element (not drag & drop, just dragging over an area), and I need to know when the Drag ends, for example, when the user lifts its finger. I know about the "OnDrop" and "OnDragFinished" events, but those are part of the UIEventListener class like the "OnDrag" one, and are mostly for detecting when the user drops whatever object he was "moving" correct?
Here's my code:
UIEventListener.Get( preloadBtn ).onDrag += CheckForPreloadNGUI;
// The behavior I need is this:
UIEventListener.Get( preloadBtn ).onDragEnded += CancelPreloadNGUI;
There is no "OnDragEnded" or "OnDragFinished" that use the "UIEventListener" class, so how can I achieve this? Do I have to use the "OnPress" event to detect when the Drag ends?
Thanks in advance!
Stephane