2019-09-11 17:46:01 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
using UnityEngine.EventSystems;
|
|
|
|
|
|
|
|
|
|
public class Submit : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public InputField inputField;
|
2019-09-12 15:37:20 +00:00
|
|
|
|
public TypingController typingController;
|
2019-09-11 17:46:01 +00:00
|
|
|
|
|
|
|
|
|
protected EventSystem eventSystem;
|
|
|
|
|
|
|
|
|
|
protected void Start() {
|
|
|
|
|
eventSystem = GameObject.FindGameObjectWithTag("EventSystem").GetComponent<EventSystem>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnClick() {
|
2019-09-12 15:37:20 +00:00
|
|
|
|
typingController.Submit(inputField.text);
|
2019-09-11 17:46:01 +00:00
|
|
|
|
inputField.text = "";
|
|
|
|
|
eventSystem.SetSelectedGameObject(inputField.gameObject);
|
|
|
|
|
}
|
|
|
|
|
}
|