FairyGUI.Stage.HandleTextInput C# (CSharp) Method

HandleTextInput() private method

private HandleTextInput ( ) : void
return void
		void HandleTextInput()
		{
			InputTextField textField = (InputTextField)_focused;
			if (!textField.editable)
				return;

			if (_keyboard != null)
			{
				string s = _keyboard.GetInput();
				if (s != null)
					textField.ReplaceText(s);

				if (_keyboard.done)
					this.focus = null;
			}
			else
			{
				if (!string.IsNullOrEmpty(Input.inputString))
				{
					StringBuilder sb = new StringBuilder();
					int len = Input.inputString.Length;
					for (int i = 0; i < len; ++i)
					{
						char ch = Input.inputString[i];
						if (ch >= ' ') sb.Append(ch.ToString());
					}
					if (sb.Length > 0)
						textField.ReplaceSelection(sb.ToString());
				}
			}
		}