mirror of
https://github.com/Steffo99/better-tee.git
synced 2024-11-22 23:34:18 +00:00
27 lines
651 B
C#
27 lines
651 B
C#
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using UnityEngine.EventSystems;
|
|||
|
|
|||
|
|
|||
|
namespace BetterTee.Player
|
|||
|
{
|
|||
|
|
|||
|
public class Submit : MonoBehaviour
|
|||
|
{
|
|||
|
public InputField inputField;
|
|||
|
public TypingController typingController;
|
|||
|
|
|||
|
protected EventSystem eventSystem;
|
|||
|
|
|||
|
protected void Start() {
|
|||
|
eventSystem = GameObject.FindGameObjectWithTag("EventSystem").GetComponent<EventSystem>();
|
|||
|
}
|
|||
|
|
|||
|
public void OnClick() {
|
|||
|
typingController.Submit(inputField.text);
|
|||
|
inputField.text = "";
|
|||
|
eventSystem.SetSelectedGameObject(inputField.gameObject);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|