工具栏问题修改,中文

This commit is contained in:
Caiyanpeng committed 2022-01-13 22:56:47 +08:00
1 parent 0458a23c20
commit 45b3ee5bbc
9 files changed
+97 -18

No files matched your search

+19 -8
View File
@@ -10,6 +10,8 @@ using UnityEngine.Events;
using DG.Tweening;
using System.Timers;
using System.Collections;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
namespace Assets.Scripts.UI.Control
{
@@ -33,6 +35,9 @@ namespace Assets.Scripts.UI.Control
private Outline outline;
private Button mButton;
private Sequence se = null;
private Sequence a;
private TweenerCore<float, float, FloatOptions> b;
private TweenerCore<float, float, FloatOptions> c;
protected void Awake()
{
@@ -146,7 +151,7 @@ namespace Assets.Scripts.UI.Control
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
{
#endif
//tooltips.SetActive(true);
//tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
@@ -157,12 +162,13 @@ namespace Assets.Scripts.UI.Control
se.SetDelay(1);
se.AppendCallback(() =>
{
DOTween.Complete(tooltips,true);
if(a!=null) a.Complete(true);
if (b != null) b.Complete(true);
tooltips.SetActive(true);
tooltips.GetComponent<CanvasGroup>().alpha = 0f;
tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
c = tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
});
se.Play();
a = se.Play();
//StartCoroutine(DelayShowTooltip());
//timer.Start();
}
@@ -200,9 +206,11 @@ namespace Assets.Scripts.UI.Control
#else
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
{
#endif
DOTween.Complete(tooltips,true);
group.DOFade(0, 1f).onComplete += () => {
#endif
if (a != null) a.Complete(true);
if (c != null) c.Complete(true);
b = group.DOFade(0, 1f);
b.onComplete += () => {
tooltips.SetActive(false);
};
}
@@ -234,8 +242,11 @@ namespace Assets.Scripts.UI.Control
UIManager.AddEvent(this.gameObject, EventTriggerType.PointerDown, new UnityEngine.Events.UnityAction<BaseEventData>(e =>
{
if (!this.isActiveAndEnabled) return;
DOTween.Complete(tooltips,true);
if (a != null) a.Complete(true);
if (b != null) b.Complete(true);
if (c != null) c.Complete(true);
tooltips.SetActive(false);
//else
//{
// DOTween.CompleteAll(true);