Beispiel #1
0
        static internal void Lua_System_Action_1_SLua_LuaTable(LuaFunction ld, SLua.LuaTable a1)
        {
            IntPtr l     = ld.L;
            int    error = pushTry(l);

            pushValue(l, a1);
            ld.pcall(1, error);
            LuaDLL.lua_settop(l, error - 1);
        }
        static internal void Lua_UIEventTriggerListener_VoidDelegate(LuaFunction ld, SLua.LuaTable a1, UnityEngine.GameObject a2, UnityEngine.EventSystems.BaseEventData a3)
        {
            IntPtr l     = ld.L;
            int    error = pushTry(l);

            pushValue(l, a1);
            pushValue(l, a2);
            pushValue(l, a3);
            ld.pcall(3, error);
            LuaDLL.lua_settop(l, error - 1);
        }
Beispiel #3
0
        static internal bool Lua_System_Predicate_1_SLua_LuaTable(LuaFunction ld, SLua.LuaTable a1)
        {
            IntPtr l     = ld.L;
            int    error = pushTry(l);

            pushValue(l, a1);
            ld.pcall(1, error);
            bool ret;

            checkType(l, error + 1, out ret);
            LuaDLL.lua_settop(l, error - 1);
            return(ret);
        }
        static internal int Lua_System_Comparison_1_SLua_LuaTable(LuaFunction ld, SLua.LuaTable a1, SLua.LuaTable a2)
        {
            IntPtr l     = ld.L;
            int    error = pushTry(l);

            pushValue(l, a1);
            pushValue(l, a2);
            ld.pcall(2, error);
            int ret;

            checkType(l, error + 1, out ret);
            LuaDLL.lua_settop(l, error - 1);
            return(ret);
        }
Beispiel #5
0
        /// <summary>
        /// 生成 垂直自动布局
        /// </summary>
        /// <param name="name">布局名称</param>
        /// <param name="template">UI模板</param>
        /// <param name="handlerNames">UI事件接收器目标列表</param>
        /// <param name="handlers">UI事件接收器函数</param>
        /// <param name="self">UI事件接收器接收类</param>
        /// <returns></returns>
        public UILayout BuildLayoutByTemplate(string name, string templateXml, string[] handlerNames, SLua.LuaFunction[] handlers, SLua.LuaTable self = null, string[] initialProps = null)
        {
            Dictionary <string, GameHandler> handlerList = new Dictionary <string, GameHandler>();

            for (int i = 0; i < handlerNames.Length; i++)
            {
                handlerList.Add(handlerNames[i], new GameHandler(name, handlers[i], self));
            }
            return(BuildLayoutByTemplate(name, templateXml, handlerList, initialProps));
        }