Ejemplo n.º 1
0
 static int Set(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         Common.UI.Components.ToggleContent obj = (Common.UI.Components.ToggleContent)ToLua.CheckObject(L, 1, typeof(Common.UI.Components.ToggleContent));
         int    arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         string arg1 = ToLua.CheckString(L, 3);
         obj.Set(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 2
0
    static int set_id(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Common.UI.Components.ToggleContent obj = (Common.UI.Components.ToggleContent)o;
            int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.id = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index id on a nil value" : e.Message));
        }
    }
Ejemplo n.º 3
0
    static int get_id(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Common.UI.Components.ToggleContent obj = (Common.UI.Components.ToggleContent)o;
            int ret = obj.id;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index id on a nil value" : e.Message));
        }
    }