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

            LuaObject.checkType(l, -1, out ld);
            LuaDLL.pua_pop(l, 1);
            if (ld.d != null)
            {
                ua = (UIScrollView.OnDragFinished)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
 public static Delegate UIScrollView_OnDragFinished(LuaFunction func)
 {
     UIScrollView.OnDragFinished d = () =>
     {
         func.Call();
     };
     return(d);
 }