Beispiel #1
0
    static int set_onSubmit(IntPtr L)
    {
        object o = L.ToUserData(1);

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

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

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

        LuaTypes funcType = L.Type(3);

        if (funcType != LuaTypes.LUA_TFUNCTION)
        {
            obj.onSubmit = (UnityEngine.Events.UnityAction <ZFrame.UGUI.UIInput>)L.ChkUserData(3, typeof(UnityEngine.Events.UnityAction <ZFrame.UGUI.UIInput>));
        }
        else
        {
            LuaFunction func = L.ToLuaFunction(3);
            obj.onSubmit = (param0) =>
            {
                int top = func.BeginPCall();
                L.PushLightUserData(param0);
                func.PCall(top, 1);
                func.EndPCall(top);
            };
        }
        return(0);
    }
Beispiel #2
0
    static int get_onSubmit(IntPtr L)
    {
        object o = L.ToUserData(1);

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

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

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

        L.PushUData(obj.onSubmit);
        return(1);
    }