Пример #1
0
        public Keys GetTextEditKey(TextEditInputs input)
        {
            switch (input)
            {
            case TextEditInputs.Delete:
                return(Keys.Back);

            case TextEditInputs.Enter:
                return(Keys.Enter);
            }
            return(Keys.None);
        }
Пример #2
0
        protected void HandleTextInput()
        {
            TextEditInputs editControl = Input.GetTextEditInput();

            if (editControl != TextEditInputs.NoInput)
            {
                switch (editControl)
                {
                case TextEditInputs.Delete:
                    if (ConnectionLobby.ServerIP.Length > 0)
                    {
                        ConnectionLobby.ServerIP = ConnectionLobby.ServerIP.Substring(0, ConnectionLobby.ServerIP.Length - 1);
                    }
                    return;
                }
            }
            else
            {
                ConnectionLobby.ServerIP += Input.GetNumberInputAsString();
            }
        }