update web requset data
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using TMPro;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
public class UIInputField : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Image _outline;
|
||||
[SerializeField] private TMP_Text _text;
|
||||
private TMP_InputField _inputField;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_inputField = GetComponent<TMP_InputField>();
|
||||
}
|
||||
|
||||
public async UniTaskVoid ShowErrorAsync(string text)
|
||||
{
|
||||
Color startColor = _outline.color;
|
||||
Color textColor = _text.color;
|
||||
textColor.a = 1;
|
||||
|
||||
_text.text = text;
|
||||
_text.DOFade(1, .25f);
|
||||
|
||||
await UniTask.Delay(2000);
|
||||
|
||||
_outline.DOColor(startColor, .25f);
|
||||
_text.DOFade(0, .25f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user