| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine.UI; |
| | | using DG.Tweening; |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | | using System; |
| | | |
| | | using System.Text.RegularExpressions; |
| | | using DG.Tweening; |
| | | |
| | | public class MessageWin : UIBase |
| | | { |
| | |
| | | // 初始化组件 |
| | | m_ContainerNormalHint.OnWaitCompelete(OnHintDisplayComplete); |
| | | m_ContainerChatHint.OnWaitCompelete(OnHintDisplayComplete); |
| | | m_ScrollControl.OnRefreshCell += OnRefreshGmCell; |
| | | m_ScrollControl.OnGetDynamicSize += OnGetDynamicSize; |
| | | |
| | | m_ScrollControl.lockType = EnhanceLockType.LockVerticalBottom; |
| | | m_GMClose.onClick.AddListener(OnGMClose); |
| | | } |
| | |
| | | ServerTipDetails.gmMessageRefresh += DisplayGM; |
| | | ServerTipDetails.gmOpenEvent += GmOpenEvent; |
| | | ServerTipDetails.chatHintRefresh += CheckChatHint; |
| | | m_ScrollControl.OnRefreshCell += OnRefreshGmCell; |
| | | m_ScrollControl.OnGetDynamicSize += OnGetDynamicSize; |
| | | CheckNormalHint(); |
| | | CheckChatHint(); |
| | | CheckServerHint(); |
| | |
| | | ServerTipDetails.gmMessageRefresh -= DisplayGM; |
| | | ServerTipDetails.gmOpenEvent -= GmOpenEvent; |
| | | ServerTipDetails.chatHintRefresh -= CheckChatHint; |
| | | // 窗口关闭时的逻辑 |
| | | m_ScrollControl.OnRefreshCell -= OnRefreshGmCell; |
| | | m_ScrollControl.OnGetDynamicSize -= OnGetDynamicSize; |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | void DisplayChatHint(SystemHintData hint) |
| | | { |
| | | // TODO YYL |
| | | // if (!UIManager.Instance.IsOpened<ChatWin>()) |
| | | // { |
| | | // return; |
| | | // } |
| | | if (!UIManager.Instance.IsOpened<ChatWin>()) |
| | | { |
| | | return; |
| | | } |
| | | if (!m_ContainerChatHint.gameObject.activeInHierarchy) |
| | | { |
| | | m_ContainerChatHint.gameObject.SetActive(true); |