Пример #1
0
        internal static int checkDelegate(IntPtr l, int p, out UIWidget.OnDimensionsChanged 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 = (UIWidget.OnDimensionsChanged)LuaObject.checkObj(l, p);
                return(result);
            }
            LuaDelegate ld;

            LuaObject.checkType(l, -1, out ld);
            LuaDLL.pua_pop(l, 1);
            if (ld.d != null)
            {
                ua = (UIWidget.OnDimensionsChanged)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);
        }
Пример #2
0
        static internal int checkDelegate(IntPtr l, int p, out UIWidget.OnDimensionsChanged 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 = (UIWidget.OnDimensionsChanged)checkObj(l, p);
                return(op);
            }
            LuaDelegate ld;

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

            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);
        }
Пример #3
0
 public static Delegate UIWidget_OnDimensionsChanged(LuaFunction func)
 {
     UIWidget.OnDimensionsChanged d = () =>
     {
         func.Call();
     };
     return(d);
 }
Пример #4
0
    public static Delegate UIWidget_OnDimensionsChanged(LuaFunction func)
    {
        if (func == null)
        {
            UIWidget.OnDimensionsChanged fn = delegate { };
            return(fn);
        }

        UIWidget.OnDimensionsChanged d = (new UIWidget_OnDimensionsChanged_Event(func)).Call;
        return(d);
    }
Пример #5
0
	static int get_onChange(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			UIWidget obj = (UIWidget)o;
			UIWidget.OnDimensionsChanged ret = obj.onChange;
			ToLua.Push(L, ret);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index onChange on a nil value");
		}
	}
Пример #6
0
	static int set_onChange(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			UIWidget obj = (UIWidget)o;
			UIWidget.OnDimensionsChanged arg0 = (UIWidget.OnDimensionsChanged)ToLua.CheckDelegate<UIWidget.OnDimensionsChanged>(L, 2);
			obj.onChange = arg0;
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index onChange on a nil value");
		}
	}
Пример #7
0
    public UIWidget.OnDimensionsChanged UIWidget_OnDimensionsChanged(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            UIWidget.OnDimensionsChanged fn = delegate() { };
            return(fn);
        }

        if (!flag)
        {
            UIWidget_OnDimensionsChanged_Event target = new UIWidget_OnDimensionsChanged_Event(func);
            UIWidget.OnDimensionsChanged       d      = target.Call;
            target.method = d.Method;
            return(d);
        }
        else
        {
            UIWidget_OnDimensionsChanged_Event target = new UIWidget_OnDimensionsChanged_Event(func, self);
            UIWidget.OnDimensionsChanged       d      = target.CallWithSelf;
            target.method = d.Method;
            return(d);
        }
    }
Пример #8
0
 void Push_UIWidget_OnDimensionsChanged(IntPtr L, UIWidget.OnDimensionsChanged o)
 {
     ToLua.Push(L, o);
 }