コード例 #1
0
 public void LoginOrRegister(TMPro.TMP_InputField nameIF)
 {
     if (Application.internetReachability != NetworkReachability.NotReachable)
     {
         LBController._lb_Controller._name = nameIF.text;
         ClientManager.clientManager.RegistrationProtses(nameIF.text, nameIF.text, (string token) => {
             if (string.IsNullOrEmpty(token))
             {
                 ClientManager.clientManager.LoginProtses(nameIF.text, nameIF.text, (string token1) =>
                 {
                     loginPage.SetActive(false); tutorialPage.SetActive(true);
                     LBController._lb_Controller._token = token1; PlayerPrefs.SetString("Token", LBController._lb_Controller._token); PlayerPrefs.SetString("Name", nameIF.text);
                 });
             }
             else
             {
                 loginPage.SetActive(false); tutorialPage.SetActive(true);
                 LBController._lb_Controller._token = token; PlayerPrefs.SetString("Token", LBController._lb_Controller._token); PlayerPrefs.SetString("Name", nameIF.text);
             }
         });
     }
     else
     {
         internetChecker.SetActive(true);
     }
 }
コード例 #2
0
    // Start is called before the first frame update

    void Start()
    {
        field = GetComponent <TMPro.TMP_InputField>();
        var listener = GameEventListener.AddGameEventListener(gameObject, condition.GetToggleEvent());

        if (listener != null)
        {
            listener.Response = new UnityEvent();
            listener.Response.AddListener(delegate { ToggleFieldState(); });
        }
        ToggleFieldState();
    }
コード例 #3
0
    // Start is called before the first frame upd[]ate
    void Start()
    {
        var ladder = managerScore.ReturnLadderBoard();
        var testi  = leaderBoardObj.GetComponentsInChildren <TextMeshProUGUI>();

        for (int i = 0; i < 5; i++)
        {
            scores[i]     = ladder[i].playerName + "  " + ladder[i].playerScore;
            testi[i].text = scores[i];
        }
        nameInputField = gameObject.GetComponentInChildren <TMP_InputField>();
    }
コード例 #4
0
    public void OnTextChanged(TMPro.TMP_InputField newValue)
    {
        string newIpString = newValue.text;

        if (newIpString == "" || !IPAddress.TryParse(newIpString, out ipAddress))
        {
            ipAddress = Globals.GetLocalIPAddress();
        }

        remoteEP = new IPEndPoint(ipAddress, port);
        Debug.Log(remoteEP.Address + " : " + remoteEP.Port);
    }
コード例 #5
0
    void Start()
    {
        up_button   = transform.Find("Up Button").GetComponent <Button>();
        down_button = transform.Find("Down Button").GetComponent <Button>();
        input       = transform.Find("Value Text").GetComponent <TMPro.TMP_InputField>();

        preValue = value;

        up_button.onClick.AddListener(delegate { ButtonHandler(1); });
        down_button.onClick.AddListener(delegate { ButtonHandler(-1); });

        input.onEndEdit.AddListener(delegate { InputHandler(); });
    }
コード例 #6
0
 private void CleanInput(TMPro.TMP_InputField input, string adefault, int min, int max)
 {
     if (!int.TryParse(input.text, out int result))
     {
         input.text = adefault;
         return;
     }
     if (result < min || result > max)
     {
         input.text = adefault;
         return;
     }
 }
コード例 #7
0
    public void eraseIfNotInt(TMPro.TMP_InputField textInp)
    {
        string text = textInp.text;

        foreach (var t in text)
        {
            if (!(t >= '0' && t <= '9'))
            {
                textInp.text = "";
                break;
            }
        }
    }
コード例 #8
0
 static int DeactivateInputField(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         TMPro.TMP_InputField obj = (TMPro.TMP_InputField)ToLua.CheckObject(L, 1, typeof(TMPro.TMP_InputField));
         obj.DeactivateInputField();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #9
0
 static int GraphicUpdateComplete(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         TMPro.TMP_InputField obj = (TMPro.TMP_InputField)ToLua.CheckObject(L, 1, typeof(TMPro.TMP_InputField));
         obj.GraphicUpdateComplete();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #10
0
 static int MoveTextStart(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         TMPro.TMP_InputField obj = (TMPro.TMP_InputField)ToLua.CheckObject(L, 1, typeof(TMPro.TMP_InputField));
         bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
         obj.MoveTextStart(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #11
0
 static int Rebuild(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         TMPro.TMP_InputField        obj  = (TMPro.TMP_InputField)ToLua.CheckObject(L, 1, typeof(TMPro.TMP_InputField));
         UnityEngine.UI.CanvasUpdate arg0 = (UnityEngine.UI.CanvasUpdate)ToLua.CheckObject(L, 2, typeof(UnityEngine.UI.CanvasUpdate));
         obj.Rebuild(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #12
0
 static int ProcessEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         TMPro.TMP_InputField obj  = (TMPro.TMP_InputField)ToLua.CheckObject(L, 1, typeof(TMPro.TMP_InputField));
         UnityEngine.Event    arg0 = (UnityEngine.Event)ToLua.CheckObject(L, 2, typeof(UnityEngine.Event));
         obj.ProcessEvent(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #13
0
    public void LoginWithEmail()

    {
        if (mailLinkPanel.isActiveAndEnabled)

        {
            Debug.Log("Kauel: Vincular Mail");

            emailInputField = email2InputField;

            passwordInputField = password2InputField;
        }

        LoginWithEmail(emailInputField.text, passwordInputField.text);
    }
コード例 #14
0
 static int OnBeginDrag(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         TMPro.TMP_InputField obj = (TMPro.TMP_InputField)ToLua.CheckObject(L, 1, typeof(TMPro.TMP_InputField));
         UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)ToLua.CheckObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData));
         obj.OnBeginDrag(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #15
0
    public PlayerState[] GetPlayerList()
    {
        if (_passPlaySetup == null)
        {
            return(null);
        }

        PlayerState[] playerStateList = new PlayerState[PlayerGroup.kMaxPlayerCount];
        for (int i = 0; i < PlayerGroup.kMaxPlayerCount; ++i)
        {
            TMPro.TMP_InputField input = _passPlaySetup.playerInputSetups[i].nameInput;
            playerStateList[i] = PlayerState.Create(i, input.text);
        }
        return(playerStateList);
    }
コード例 #16
0
    public static void AddTMP_InputFieldOnEndEdit(GameObject go, Action <string> onValChange)
    {
        TMPro.TMP_InputField inputField = go.GetComponent <TMPro.TMP_InputField>();
        if (inputField == null)
        {
            return;
        }

        inputField.onEndEdit.AddListener(delegate(string b) {
            if (onValChange != null)
            {
                onValChange(b);
            }
        });
    }
コード例 #17
0
 static int RemoveEndEdit(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FirClient.Behaviour.LuaBehaviour obj  = (FirClient.Behaviour.LuaBehaviour)ToLua.CheckObject <FirClient.Behaviour.LuaBehaviour>(L, 1);
         TMPro.TMP_InputField             arg0 = (TMPro.TMP_InputField)ToLua.CheckObject <TMPro.TMP_InputField>(L, 2);
         obj.RemoveEndEdit(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #18
0
ファイル: PruebaInput.cs プロジェクト: rubohex/V1Rus
    public void changePosY(TMPro.TMP_InputField input)
    {
        string texto = input.text;

        if (Regex.IsMatch(texto, "^([+-]?[1-9]\\d*|0)$"))
        {
            int posY = int.Parse(texto);
            print("Y = " + posY);
            target.transform.position = new Vector3(target.transform.position.x, posY, target.transform.position.z);
        }
        else
        {
            print("Y = error");
        }
    }
コード例 #19
0
    protected override void Initiate()
    {
        xInputField = rectTransform.Find("Mask").Find("XInputField").GetComponent <TMPro.TMP_InputField>();
        yInputField = rectTransform.Find("Mask").Find("YInputField").GetComponent <TMPro.TMP_InputField>();
        zInputField = rectTransform.Find("Mask").Find("ZInputField").GetComponent <TMPro.TMP_InputField>();

        xInputField.contentType = TMPro.TMP_InputField.ContentType.DecimalNumber;
        yInputField.contentType = TMPro.TMP_InputField.ContentType.DecimalNumber;
        zInputField.contentType = TMPro.TMP_InputField.ContentType.DecimalNumber;

        xInputField.onEndEdit.AddListener(OnEndEdit);
        yInputField.onEndEdit.AddListener(OnEndEdit);
        zInputField.onEndEdit.AddListener(OnEndEdit);

        UpdateUI();
    }
コード例 #20
0
    public void validateRest()
    {
        TMPro.TMP_InputField text = gameObject.GetComponent <TMPro.TMP_InputField>();
        int l = text.text.Length;

        if (l <= 0)
        {
            return;
        }
        char ch = text.text[l - 1];

        if (!(ch >= '0' && ch <= '9' || ch == '.' || ch == ' ' || ch == '-'))
        {
            text.text = text.text.Remove(l - 1, 1);
        }
    }
コード例 #21
0
    void Start()
    {
        input = GetComponent <TMPro.TMP_InputField>();
        date  = GetComponent <EntryValue.DateValue>().date;

        //print(ValidateDate("12/4/")); //MM/dd

        //Test("12/4/2019");
        //Test("12/04/2019");
        //Test("13/04/2019");
        //Test("1/2/2020");

        input.onEndEdit.AddListener(UpdateDate);
        //input.onEndEdit.AddListener(ValidateDate);
        //input.onValueChanged.AddListener(ValidateDate);
    }
コード例 #22
0
    static int set_text(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TMPro.TMP_InputField obj = (TMPro.TMP_InputField)o;
            string arg0 = ToLua.CheckString(L, 2);
            obj.text = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index text on a nil value" : e.Message));
        }
    }
コード例 #23
0
 static int AddEndEdit(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         FirClient.Behaviour.LuaBehaviour obj  = (FirClient.Behaviour.LuaBehaviour)ToLua.CheckObject <FirClient.Behaviour.LuaBehaviour>(L, 1);
         TMPro.TMP_InputField             arg0 = (TMPro.TMP_InputField)ToLua.CheckObject <TMPro.TMP_InputField>(L, 2);
         LuaTable    arg1 = ToLua.CheckLuaTable(L, 3);
         LuaFunction arg2 = ToLua.CheckLuaFunction(L, 4);
         obj.AddEndEdit(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #24
0
ファイル: KTwitter.cs プロジェクト: KauelChile/Ceresita
    public void OnlyUpdatePIN(TMPro.TMP_InputField pin)

    {
        panelTwitterOnlyPINRequest.FadeOutAndDesactivate();

        Alert.Singleton.ShowAlert(Alert.Message.LOADING, false);

        StartCoroutine(Twitter.API.GetAccessToken(consumerKey,

                                                  consumerSecret,

                                                  token,

                                                  pin.text,

                                                  new Twitter.AccessTokenCallback(this.OnlyOnAccessTokenCallback)));
    }
コード例 #25
0
    private void Start()
    {
        string defaultName = string.Empty;

        TMPro.TMP_InputField IField = GetComponent <TMPro.TMP_InputField>();

        if (IField != null)
        {
            if (PlayerPrefs.HasKey(playerNamePrefKey))
            {
                defaultName = PlayerPrefs.GetString(playerNamePrefKey);
                IField.text = defaultName;
            }
        }

        PhotonNetwork.NickName = defaultName;
    }
コード例 #26
0
    static int set_inputValue(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FirClient.Component.VarData obj  = (FirClient.Component.VarData)o;
            TMPro.TMP_InputField        arg0 = (TMPro.TMP_InputField)ToLua.CheckObject <TMPro.TMP_InputField>(L, 2);
            obj.inputValue = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index inputValue on a nil value"));
        }
    }
コード例 #27
0
    static int get_inputValue(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FirClient.Component.VarData obj = (FirClient.Component.VarData)o;
            TMPro.TMP_InputField        ret = obj.inputValue;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index inputValue on a nil value"));
        }
    }
コード例 #28
0
    static int get_wasCanceled(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TMPro.TMP_InputField obj = (TMPro.TMP_InputField)o;
            bool ret = obj.wasCanceled;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index wasCanceled on a nil value" : e.Message));
        }
    }
コード例 #29
0
    static int get_selectionFocusPosition(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TMPro.TMP_InputField obj = (TMPro.TMP_InputField)o;
            int ret = obj.selectionFocusPosition;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index selectionFocusPosition on a nil value" : e.Message));
        }
    }
コード例 #30
0
    static int set_shouldHideMobileInput(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TMPro.TMP_InputField obj = (TMPro.TMP_InputField)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.shouldHideMobileInput = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index shouldHideMobileInput on a nil value" : e.Message));
        }
    }