| | 1 | | using DCL.Components; |
| | 2 | | using System.Collections; |
| | 3 | | using System.Collections.Generic; |
| | 4 | | using TMPro; |
| | 5 | | using UnityEngine; |
| | 6 | |
|
| | 7 | | public class SmartItemTextAreaParameter : SmartItemUIParameterAdapter |
| | 8 | | { |
| | 9 | | public TMP_InputField textParameterInputField; |
| | 10 | |
|
| 0 | 11 | | private void Start() { textParameterInputField.onEndEdit.AddListener(OnValueChange); } |
| | 12 | |
|
| | 13 | | public override void SetInfo() |
| | 14 | | { |
| 0 | 15 | | base.SetInfo(); |
| | 16 | |
|
| 0 | 17 | | textParameterInputField.gameObject.SetActive(true); |
| | 18 | |
|
| 0 | 19 | | textParameterInputField.contentType = TMP_InputField.ContentType.Standard; |
| 0 | 20 | | textParameterInputField.SetTextWithoutNotify((string)GetParameterValue()); |
| 0 | 21 | | } |
| | 22 | |
|
| 0 | 23 | | public void OnValueChange(string text) { SetParameterValue(text); } |
| | 24 | | } |