static internal int checkDelegate(IntPtr l, int p, out UIGrid.OnReposition ua)
        {
            int op = extractFunction(l, p);

            if (LuaDLL.lua_isnil(l, p))
            {
                ua = null;
                return(op);
            }
            else if (LuaDLL.lua_isuserdata(l, p) == 1)
            {
                ua = (UIGrid.OnReposition)checkObj(l, p);
                return(op);
            }
            LuaDelegate ld;

            checkType(l, -1, out ld);
            LuaDLL.lua_pop(l, 1);
            if (ld.d != null)
            {
                ua = (UIGrid.OnReposition)ld.d;
                return(op);
            }

            l  = LuaState.get(l).L;
            ua = () =>
            {
                int error = pushTry(l);

                ld.pcall(0, error);
                LuaDLL.lua_settop(l, error - 1);
            };
            ld.d = ua;
            return(op);
        }
Exemplo n.º 2
0
    static int set_onReposition(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UIGrid obj = (UIGrid)o;
            UIGrid.OnReposition arg0      = null;
            LuaTypes            funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (UIGrid.OnReposition)ToLua.CheckObject(L, 2, typeof(UIGrid.OnReposition));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(UIGrid.OnReposition), func) as UIGrid.OnReposition;
            }

            obj.onReposition = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onReposition on a nil value" : e.Message));
        }
    }
Exemplo n.º 3
0
        internal static int checkDelegate(IntPtr l, int p, out UIGrid.OnReposition ua)
        {
            int result = LuaObject.extractFunction(l, p);

            if (LuaDLL.pua_isnil(l, p))
            {
                ua = null;
                return(result);
            }
            if (LuaDLL.pua_isuserdata(l, p) == 1)
            {
                ua = (UIGrid.OnReposition)LuaObject.checkObj(l, p);
                return(result);
            }
            LuaDelegate ld;

            LuaObject.checkType(l, -1, out ld);
            LuaDLL.pua_pop(l, 1);
            if (ld.d != null)
            {
                ua = (UIGrid.OnReposition)ld.d;
                return(result);
            }
            l  = LuaState.get(l).L;
            ua = delegate
            {
                int num = LuaObject.pushTry(l);
                ld.pcall(0, num);
                LuaDLL.pua_settop(l, num - 1);
            };
            ld.d = ua;
            return(result);
        }
Exemplo n.º 4
0
 public static Delegate UIGrid_OnReposition(LuaFunction func)
 {
     UIGrid.OnReposition d = () =>
     {
         func.Call();
     };
     return(d);
 }
Exemplo n.º 5
0
    public static Delegate UIGrid_OnReposition(LuaFunction func)
    {
        if (func == null)
        {
            UIGrid.OnReposition fn = delegate { };
            return(fn);
        }

        UIGrid.OnReposition d = (new UIGrid_OnReposition_Event(func)).Call;
        return(d);
    }
Exemplo n.º 6
0
    static int get_onReposition(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UIGrid obj = (UIGrid)o;
            UIGrid.OnReposition ret = obj.onReposition;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onReposition on a nil value" : e.Message));
        }
    }
Exemplo n.º 7
0
    static int set_onReposition(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UIGrid obj = (UIGrid)o;
            UIGrid.OnReposition arg0 = (UIGrid.OnReposition)ToLua.CheckDelegate <UIGrid.OnReposition>(L, 2);
            obj.onReposition = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index onReposition on a nil value"));
        }
    }
Exemplo n.º 8
0
    private static int get_onReposition(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            UIGrid uIGrid = (UIGrid)obj;
            UIGrid.OnReposition onReposition = uIGrid.onReposition;
            ToLua.Push(L, onReposition);
            result = 1;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index onReposition on a nil value");
        }
        return(result);
    }
Exemplo n.º 9
0
    public UIGrid.OnReposition UIGrid_OnReposition(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            UIGrid.OnReposition fn = delegate() { };
            return(fn);
        }

        if (!flag)
        {
            UIGrid_OnReposition_Event target = new UIGrid_OnReposition_Event(func);
            UIGrid.OnReposition       d      = target.Call;
            target.method = d.Method;
            return(d);
        }
        else
        {
            UIGrid_OnReposition_Event target = new UIGrid_OnReposition_Event(func, self);
            UIGrid.OnReposition       d      = target.CallWithSelf;
            target.method = d.Method;
            return(d);
        }
    }
Exemplo n.º 10
0
 void Push_UIGrid_OnReposition(IntPtr L, UIGrid.OnReposition o)
 {
     ToLua.Push(L, o);
 }