using EnhancedUI.EnhancedScroller; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using System; using Snxxz.UI; public class ChatPlayerOtherCell : ScrollerUI { [SerializeField] Image chatIcon; [SerializeField] Text vipText; [SerializeField] Text playerNameText; [SerializeField] RectTransform bubbleRt; [SerializeField] RichText chatText; ChatCenter m_ChatCenter; ChatCenter chatCenter { get { return m_ChatCenter ?? (m_ChatCenter = ModelCenter.Instance.GetModel()); } } public override void Refresh(CellView cell) { ChatData _data = chatCenter.GetChatData(ChatCtrl.Inst.presentChatType, cell.index); if (_data == null) { return; } #region 更新高度 if (type == ScrollerDataType.Header) { if (chatText.preferredWidth > chatText.rectTransform.rect.width) { chatText.alignment = TextAnchor.UpperLeft; } else { chatText.alignment = TextAnchor.UpperRight; } } #endregion Button headBtn = chatIcon.GetComponent