static int OnScroll(IntPtr L)
 {
     L.ChkArgsCount(2);
     ZFrame.UGUI.UIScrollView obj = (ZFrame.UGUI.UIScrollView)L.ChkUnityObjectSelf(1, "ZFrame.UGUI.UIScrollView");
     UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)L.ChkUserData(2, typeof(UnityEngine.EventSystems.PointerEventData));
     obj.OnScroll(arg0);
     return(0);
 }
    static int get_onDrag(IntPtr L)
    {
        object o = L.ToUserData(1);

        ZFrame.UGUI.UIScrollView obj = (ZFrame.UGUI.UIScrollView)o;

        if (obj == null)
        {
            LuaTypes types = L.Type(1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name onDrag");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index onDrag on a nil value");
            }
        }

        L.PushUData(obj.onDrag);
        return(1);
    }
    static int set_onScroll(IntPtr L)
    {
        object o = L.ToUserData(1);

        ZFrame.UGUI.UIScrollView obj = (ZFrame.UGUI.UIScrollView)o;

        if (obj == null)
        {
            LuaTypes types = L.Type(1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name onScroll");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index onScroll on a nil value");
            }
        }

        LuaTypes funcType = L.Type(3);

        if (funcType != LuaTypes.LUA_TFUNCTION)
        {
            obj.onScroll = (UnityEngine.Events.UnityAction)L.ChkUserData(3, typeof(UnityEngine.Events.UnityAction));
        }
        else
        {
            LuaFunction func = L.ToLuaFunction(3);
            obj.onScroll = () =>
            {
                func.Call();
            };
        }
        return(0);
    }
Exemplo n.º 4
0
 void Start()
 {
     mScrollView = this.GetComponent <UIScrollView>();
     currentPage = 0;
 }