コード例 #1
0
    static int AddDropdownItem(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                UnityEngine.UI.Extensions.DropdownControl obj = (UnityEngine.UI.Extensions.DropdownControl)ToLua.CheckObject <UnityEngine.UI.Extensions.DropdownControl>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.AddDropdownItem(arg0);
                return(0);
            }
            else if (count == 3)
            {
                UnityEngine.UI.Extensions.DropdownControl obj = (UnityEngine.UI.Extensions.DropdownControl)ToLua.CheckObject <UnityEngine.UI.Extensions.DropdownControl>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                string arg1 = ToLua.CheckString(L, 3);
                obj.AddDropdownItem(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.UI.Extensions.DropdownControl.AddDropdownItem"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #2
0
 static int RefreshShownValue(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.UI.Extensions.DropdownControl obj = (UnityEngine.UI.Extensions.DropdownControl)ToLua.CheckObject <UnityEngine.UI.Extensions.DropdownControl>(L, 1);
         obj.RefreshShownValue();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #3
0
 static int SetCaptionText(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.UI.Extensions.DropdownControl obj = (UnityEngine.UI.Extensions.DropdownControl)ToLua.CheckObject <UnityEngine.UI.Extensions.DropdownControl>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         obj.SetCaptionText(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #4
0
 static int GetIndex(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.UI.Extensions.DropdownControl obj = (UnityEngine.UI.Extensions.DropdownControl)ToLua.CheckObject <UnityEngine.UI.Extensions.DropdownControl>(L, 1);
         int o = obj.GetIndex();
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #5
0
 static int SetIndex(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.UI.Extensions.DropdownControl obj = (UnityEngine.UI.Extensions.DropdownControl)ToLua.CheckObject <UnityEngine.UI.Extensions.DropdownControl>(L, 1);
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         obj.SetIndex(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #6
0
 static int OnPointerClick(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.UI.Extensions.DropdownControl obj  = (UnityEngine.UI.Extensions.DropdownControl)ToLua.CheckObject <UnityEngine.UI.Extensions.DropdownControl>(L, 1);
         UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)ToLua.CheckObject <UnityEngine.EventSystems.PointerEventData>(L, 2);
         obj.OnPointerClick(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #7
0
    static int set_onValueChanged(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.UI.Extensions.DropdownControl obj = (UnityEngine.UI.Extensions.DropdownControl)o;
            System.Action <int> arg0 = (System.Action <int>)ToLua.CheckDelegate <System.Action <int> >(L, 2);
            obj.onValueChanged = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index onValueChanged on a nil value"));
        }
    }
コード例 #8
0
    static int get_onValueChanged(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.UI.Extensions.DropdownControl obj = (UnityEngine.UI.Extensions.DropdownControl)o;
            System.Action <int> ret = obj.onValueChanged;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index onValueChanged on a nil value"));
        }
    }