FairyGUI.ScrollPane.CancelDragging C# (CSharp) Method

CancelDragging() public method

当滚动面板处于拖拽滚动状态或即将进入进入拖拽状态时,可以调用此方法停止或禁止本次拖拽。
public CancelDragging ( ) : void
return void
        public void CancelDragging()
        {
            Stage.inst.onTouchMove.Remove(_touchMoveDelegate);
            Stage.inst.onTouchEnd.Remove(_touchEndDelegate);

            if (draggingPane == this)
                draggingPane = null;

            _gestureFlag = 0;
            _isMouseMoved = false;
        }

Usage Example

 static int CancelDragging(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.ScrollPane obj = (FairyGUI.ScrollPane)ToLua.CheckObject(L, 1, typeof(FairyGUI.ScrollPane));
         obj.CancelDragging();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }