static int IntToEnum(IntPtr L)
    {
        int arg0 = (int)LuaDLL.lua_tonumber(L, 1);

        UnityEngine.UI.InputField.ContentType o = (UnityEngine.UI.InputField.ContentType)arg0;
        ToLua.Push(L, o);
        return(1);
    }
예제 #2
0
 /// <summary>
 /// Sets the type of the player input.
 /// </summary>
 /// <param name="type">Type.</param>
 /// <param name="players">Players.</param>
 public void SetPlayerInputType(UnityEngine.UI.InputField.ContentType type, uPomelos player)
 {
     if (player == null)
     {
         return;
     }
     player.RpcModifyInputType(type);
 }
예제 #3
0
 protected void SetupPlayer(uPomelos player, UnityEngine.UI.InputField.ContentType type)
 {
     // 禁用所有玩家输入系统
     serverManager.TogglePlayerInput(false, type, target.players);
     // 设置玩家发言的接收列表为本身
     serverManager.SetReceivePlayer(player, target.players);
     // 启用玩家输入系统
     serverManager.TogglePlayerInput(true, type, player);
 }
예제 #4
0
 /// <summary>
 /// Sets the type of the player input.
 /// </summary>
 /// <param name="type">Type.</param>
 /// <param name="players">Players.</param>
 public void SetPlayerInputType(UnityEngine.UI.InputField.ContentType type, List <uPomelos> players)
 {
     if (players == null)
     {
         return;
     }
     RemoveEmpty(players);
     foreach (var p in players)
     {
         p.RpcModifyInputType(type);
     }
 }
예제 #5
0
 /// <summary>
 /// 启用/禁用玩家输入
 /// </summary>
 /// <param name="active">If set to <c>true</c> active.</param>
 /// <param name="players">Players.</param>
 public void TogglePlayerInput(bool active, UnityEngine.UI.InputField.ContentType type, uPomelos player)
 {
     if (player == null)
     {
         return;
     }
     if (player.isDie)
     {
         player.RpcToggleInput(false, type);
     }
     else
     {
         player.RpcToggleInput(active, type);
     }
 }
    static int get_contentType(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.UI.InputField             obj = (UnityEngine.UI.InputField)o;
            UnityEngine.UI.InputField.ContentType ret = obj.contentType;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index contentType on a nil value"));
        }
    }
    static int set_contentType(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.UI.InputField             obj  = (UnityEngine.UI.InputField)o;
            UnityEngine.UI.InputField.ContentType arg0 = (UnityEngine.UI.InputField.ContentType)ToLua.CheckObject(L, 2, typeof(UnityEngine.UI.InputField.ContentType));
            obj.contentType = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index contentType on a nil value"));
        }
    }
예제 #8
0
 /// <summary>
 /// 启用/禁用玩家输入
 /// </summary>
 /// <param name="active">If set to <c>true</c> active.</param>
 /// <param name="players">Players.</param>
 public void TogglePlayerInput(bool active, UnityEngine.UI.InputField.ContentType type, List <uPomelos> players)
 {
     if (players == null)
     {
         return;
     }
     RemoveEmpty(players);
     foreach (var p in players)
     {
         if (p.isDie)
         {
             p.RpcToggleInput(false, type);
         }
         else
         {
             p.RpcToggleInput(active, type);
         }
     }
 }
 static void Push(IntPtr L, UnityEngine.UI.InputField.ContentType arg)
 {
     ToLua.Push(L, arg);
 }
예제 #10
0
 public void ValueIsValidatedCorrectly(ContentType type, string testValue, string expected)
 {
     m_TestObject.contentType = type;
     m_TestObject.text        = testValue;
     Assert.AreEqual(expected, m_TestObject.text);
 }