public void AddNewSentenceListener() { GUI_TextInputElement instance = Instantiate(_prefab, _anchor); instance.SelectedTextInputFieldElementeEvent.AddEventListener(SelectedListener); _inputFields.Add(instance); }
private void SingleValidateButtonClicked(GUI_TextInputElement item) { if (item.IsEmptyString()) { Debug.Log("Empty String and Button can be pressed. Something is wrong -> button can not to be interactable"); } else { List <string> text = new List <string>(); text.Add(item.GetInputText()); var list = new List <GUI_TextInputElement>(); list.Add(item); Validate(list, text, GetBoardInformation()); } }
public void RemoveLastSentenceListener() { if (_inputFields.Count > 1) { GUI_TextInputElement targetTextField = null; if (_currentTextInputElement != null) { targetTextField = _currentTextInputElement; } else { targetTextField = _inputFields[_inputFields.Count - 1]; } _inputFields.Remove(targetTextField); Destroy(targetTextField.gameObject); } }
private void SelectedListener(GUI_TextInputElement arg0) { _currentTextInputElement = arg0; }