예제 #1
0
        void Start()
        {
            InitDots();
            LoopListViewInitParam initParam = LoopListViewInitParam.CopyDefaultInitParam();

            initParam.mSnapVecThreshold         = 99999;
            mLoopListView.mOnBeginDragAction    = OnBeginDrag;
            mLoopListView.mOnDragingAction      = OnDraging;
            mLoopListView.mOnEndDragAction      = OnEndDrag;
            mLoopListView.mOnSnapNearestChanged = OnSnapNearestChanged;
            mLoopListView.InitListView(mPageCount, OnGetItemByIndex, initParam);

            mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
            mBackButton.onClick.AddListener(OnBackBtnClicked);
        }
예제 #2
0
    static int InitListView(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3)
            {
                SuperScrollView.LoopListView2 obj = (SuperScrollView.LoopListView2)ToLua.CheckObject <SuperScrollView.LoopListView2>(L, 1);
                int arg0 = (int)LuaDLL.luaL_checkinteger(L, 2);
                System.Func <SuperScrollView.LoopListView2, int, SuperScrollView.LoopListViewItem2> arg1 = (System.Func <SuperScrollView.LoopListView2, int, SuperScrollView.LoopListViewItem2>)ToLua.CheckDelegate <System.Func <SuperScrollView.LoopListView2, int, SuperScrollView.LoopListViewItem2> >(L, 3);
                obj.InitListView(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <int, System.Func <SuperScrollView.LoopListView2, int, SuperScrollView.LoopListViewItem2>, SuperScrollView.LoopListViewInitParam>(L, 2))
            {
                SuperScrollView.LoopListView2 obj = (SuperScrollView.LoopListView2)ToLua.CheckObject <SuperScrollView.LoopListView2>(L, 1);
                int arg0 = (int)LuaDLL.lua_tointeger(L, 2);
                System.Func <SuperScrollView.LoopListView2, int, SuperScrollView.LoopListViewItem2> arg1 = (System.Func <SuperScrollView.LoopListView2, int, SuperScrollView.LoopListViewItem2>)ToLua.ToObject(L, 3);
                SuperScrollView.LoopListViewInitParam arg2 = (SuperScrollView.LoopListViewInitParam)ToLua.ToObject(L, 4);
                obj.InitListView(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <LuaInterface.LuaTable, int, LuaInterface.LuaFunction>(L, 2))
            {
                SuperScrollView.LoopListView2 obj = (SuperScrollView.LoopListView2)ToLua.CheckObject <SuperScrollView.LoopListView2>(L, 1);
                LuaTable    arg0 = ToLua.ToLuaTable(L, 2);
                int         arg1 = (int)LuaDLL.lua_tointeger(L, 3);
                LuaFunction arg2 = ToLua.ToLuaFunction(L, 4);
                obj.InitListView(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: SuperScrollView.LoopListView2.InitListView"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }