Drag() public method

Drag the object along the plane.
public Drag ( ) : void
return void
    /// <summary>
    /// Drag the object along the plane.
    /// </summary>

    void OnDrag(Vector2 delta)
    {
        if (scrollView && NGUITools.GetActive(this))
        {
            scrollView.Drag();
        }
    }
	private void OnDrag(Vector2 delta)
	{
		if (Object.op_Implicit(scrollView) && NGUITools.GetActive(this))
		{
			scrollView.Drag();
		}
	}
    /// <summary>
    /// Drag the object along the plane.
    /// </summary>

    void OnDrag(Vector2 delta)
    {
        if (MouseDrag)
        {
            if (scrollView && NGUITools.GetActive(this))
            {
                scrollView.Drag();
            }
        }
        else
        {
            if (scrollView && NGUITools.GetActive(this))
            {
                if (scrollView.movement == UIScrollView.Movement.Horizontal)
                {
                    scrollView.Scroll(delta.x);
                }
                else if (scrollView.movement == UIScrollView.Movement.Vertical)
                {
                    scrollView.Scroll(delta.y);
                }
                else
                {
                    scrollView.Scroll(delta.x);
                    scrollView.Scroll(delta.y);
                }
            }
        }
    }
    /// <summary>
    /// Drag the object along the plane.
    /// </summary>

    void OnDrag(Vector2 delta)
    {
        if (enabled && NGUITools.GetActive(gameObject) && scrollView != null)
        {
            scrollView.Drag();
        }
    }
Example #5
0
    /// <summary>
    /// Drag the object along the plane.
    /// </summary>

    public void OnDrag(Vector2 delta)      // modify by chenbin
    {
        if (scrollView && NGUITools.GetActive(this))
        {
            scrollView.Drag();
        }
    }
    /// <summary>
    /// Drag the object along the plane.
    /// </summary>

    void OnDrag(Vector2 delta)
    {
        if (scrollView && enabled && NGUITools.GetActive(gameObject))
        {
            scrollView.Drag();
        }
    }
Example #7
0
    static int Drag(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        UIScrollView obj = (UIScrollView)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UIScrollView");

        obj.Drag();
        return(0);
    }
 void OnDrag(Vector2 delta)
 {
     // Drag the selected scroll view.
     if (isInvalid)
     {
         return;
     }
     selectedScrollView.Drag();
 }
Example #9
0
    /// <summary>
    /// Drag the object along the plane.
    /// </summary>

    void OnDrag(Vector2 delta)
    {
        if (scrollView && NGUITools.GetActive(this))
        {
            if (onDragDelegate != null)
            {
                onDragDelegate(delta);
            }
            scrollView.Drag();
        }
    }
 static public int Drag(IntPtr l)
 {
     try {
         UIScrollView self = (UIScrollView)checkSelf(l);
         self.Drag();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #11
0
 static int Drag(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UIScrollView obj = (UIScrollView)ToLua.CheckObject <UIScrollView>(L, 1);
         obj.Drag();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #12
0
    /// <summary>
    /// Drag the object along the plane.
    /// </summary>

    void OnDrag(Vector2 delta)
    {
        //wxl
        if (scrollView && NGUITools.GetActive(this))
        {
            if (scrollView.centerOnChildForMain == null)
            {
                scrollView.Drag();
            }
            else
            {
                this.CancelDrag();
//                scrollView.OnDragForMain();
            }
        }
    }
Example #13
0
    private static int Drag(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 1);
            UIScrollView uIScrollView = (UIScrollView)ToLua.CheckObject(L, 1, typeof(UIScrollView));
            uIScrollView.Drag();
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }
Example #14
0
    public static int Drag(IntPtr l)
    {
        int result;

        try
        {
            UIScrollView uIScrollView = (UIScrollView)LuaObject.checkSelf(l);
            uIScrollView.Drag();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #15
0
        static int _m_Drag(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UIScrollView gen_to_be_invoked = (UIScrollView)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Drag(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }