Esempio n. 1
0
    static int SetSprite(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                cs.GuiButton obj  = (cs.GuiButton)ToLua.CheckObject <cs.GuiButton>(L, 1);
                string       arg0 = ToLua.CheckString(L, 2);
                obj.SetSprite(arg0);
                return(0);
            }
            else if (count == 3)
            {
                cs.GuiButton obj  = (cs.GuiButton)ToLua.CheckObject <cs.GuiButton>(L, 1);
                string       arg0 = ToLua.CheckString(L, 2);
                bool         arg1 = LuaDLL.luaL_checkboolean(L, 3);
                obj.SetSprite(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: cs.GuiButton.SetSprite"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Esempio n. 2
0
    static int RemoveListener(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <LuaInterface.LuaFunction>(L, 2))
            {
                cs.GuiButton obj  = (cs.GuiButton)ToLua.CheckObject <cs.GuiButton>(L, 1);
                LuaFunction  arg0 = ToLua.ToLuaFunction(L, 2);
                obj.RemoveListener(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes <UnityEngine.Events.UnityAction>(L, 2))
            {
                cs.GuiButton obj = (cs.GuiButton)ToLua.CheckObject <cs.GuiButton>(L, 1);
                UnityEngine.Events.UnityAction arg0 = (UnityEngine.Events.UnityAction)ToLua.ToObject(L, 2);
                obj.RemoveListener(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: cs.GuiButton.RemoveListener"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Esempio n. 3
0
 static int Clear(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         cs.GuiButton obj = (cs.GuiButton)ToLua.CheckObject <cs.GuiButton>(L, 1);
         obj.Clear();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 4
0
 static int Initialize(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         cs.GuiButton obj = (cs.GuiButton)ToLua.CheckObject <cs.GuiButton>(L, 1);
         bool         o   = obj.Initialize();
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 5
0
 static int RemoveMouseUpListener(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         cs.GuiButton obj  = (cs.GuiButton)ToLua.CheckObject <cs.GuiButton>(L, 1);
         LuaFunction  arg0 = ToLua.CheckLuaFunction(L, 2);
         obj.RemoveMouseUpListener(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 6
0
 static int OnPointerUp(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         cs.GuiButton obj = (cs.GuiButton)ToLua.CheckObject <cs.GuiButton>(L, 1);
         UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)ToLua.CheckObject <UnityEngine.EventSystems.PointerEventData>(L, 2);
         obj.OnPointerUp(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 7
0
 static int SetDefaultSprite(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         cs.GuiButton obj  = (cs.GuiButton)ToLua.CheckObject <cs.GuiButton>(L, 1);
         string       arg0 = ToLua.CheckString(L, 2);
         obj.SetDefaultSprite(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 8
0
 static int ToButton(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         cs.GuiControl obj = (cs.GuiControl)ToLua.CheckObject <cs.GuiControl>(L, 1);
         cs.GuiButton  o   = obj.ToButton();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 9
0
    static int get_UGUI_Image(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            cs.GuiButton         obj = (cs.GuiButton)o;
            UnityEngine.UI.Image ret = obj.UGUI_Image;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index UGUI_Image on a nil value"));
        }
    }