Beispiel #1
0
    static int Init(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 3);
            LoopItemScrollView obj = (LoopItemScrollView)ToLua.CheckObject(L, 1, typeof(LoopItemScrollView));
            System.Collections.Generic.List <LoopItemData> arg0 = (System.Collections.Generic.List <LoopItemData>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <LoopItemData>));
            LoopItemScrollView.DelegateHandler             arg1 = null;
            LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

            if (funcType3 != LuaTypes.LUA_TFUNCTION)
            {
                arg1 = (LoopItemScrollView.DelegateHandler)ToLua.CheckObject(L, 3, typeof(LoopItemScrollView.DelegateHandler));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 3);
                arg1 = DelegateFactory.CreateDelegate(typeof(LoopItemScrollView.DelegateHandler), func) as LoopItemScrollView.DelegateHandler;
            }

            obj.Init(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #2
0
    void InitScrollview()
    {
        List <LoopItemData> datas = new List <LoopItemData>();

        //for (int i = 0; i < contentArr.Length; i++)
        //{
        //    LoopItemData data = new chatItemData(contentArr[i], typeArr[i]);
        //    datas.Add(data);
        //}
        myLoopSV.Init(datas, OnItemInit);
        //UpdateInFront(typeArr,contentArr,typeArr.Length);
    }