예제 #1
0
    static int set_onInputFieldChanged(IntPtr L)
    {
        object o = null;

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

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

            obj.onInputFieldChanged = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onInputFieldChanged on a nil value" : e.Message));
        }
    }
예제 #2
0
    public static UGUILuaEventListener Get(LuaTable _table)
    {
        GameObject           go       = _table ["gameObject"] as GameObject;
        UGUILuaEventListener listener = go.GetComponent <UGUILuaEventListener>();

        if (listener == null)
        {
            listener          = go.AddComponent <UGUILuaEventListener> ();
            listener.luaTable = _table;
        }
        return(listener);
    }
예제 #3
0
 static int OnPointerExit(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UGUILuaEventListener obj = (UGUILuaEventListener)ToLua.CheckObject(L, 1, typeof(UGUILuaEventListener));
         UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)ToLua.CheckObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData));
         obj.OnPointerExit(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
예제 #4
0
 static int Get(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         LuaTable             arg0 = ToLua.CheckLuaTable(L, 1);
         UGUILuaEventListener o    = UGUILuaEventListener.Get(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
예제 #5
0
    static int set_luaTable(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UGUILuaEventListener obj  = (UGUILuaEventListener)o;
            LuaTable             arg0 = ToLua.CheckLuaTable(L, 2);
            obj.luaTable = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index luaTable on a nil value" : e.Message));
        }
    }
예제 #6
0
    static int get_luaTable(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UGUILuaEventListener  obj = (UGUILuaEventListener)o;
            LuaInterface.LuaTable ret = obj.luaTable;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index luaTable on a nil value" : e.Message));
        }
    }
예제 #7
0
    static int get_onInputFieldChanged(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UGUILuaEventListener obj = (UGUILuaEventListener)o;
            UGUILuaEventListener.StringDelegate ret = obj.onInputFieldChanged;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onInputFieldChanged on a nil value" : e.Message));
        }
    }