Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: wallabie on May 19, 2014, 01:08:07 AM
-
The use case:
I'm using UICenterOnChild on a Grid. As the user is scrolling through the scrollView, is there an event that can be subscribed to to know when the Centered Child item has changed ?
Essentially, need events that tracks the entire cycle of : DragStart, Dragging, DragEnd . Did notice that scrollView does have a OnDragFinished.
-
The UIScrollView has a isDragging and onDragFinished. The colliders you're using will have OnDrag right now.
There isn't a OnDragStarted event on the scrollview, although there might as well be.
-
It makes sense to have the component issue the entire cycle of dragStart,Dragging,DragEnd to be consistent. This way one doesn't have to go different places for each of these events. Also, isDragging is only a bool which means we have to query this in an update(), kinda waste of resources.
-
Yeah I'm inclined I'd agree with you on that one. Maybe you wouldn't need the Dragging since UIPanel already has an OnMove you can attach to, but it definitely makes sense to have DragStart and DragEnd.