using System.Collections; 
 | 
using System.Collections.Generic; 
 | 
using UnityEngine; 
 | 
using UnityEngine.UI; 
 | 
  
 | 
//public class ChatFriendCell : ScrollerUI  
 | 
//{  
 | 
//    [SerializeField] RichText m_ChatText;  
 | 
//    [SerializeField] Text m_VipText;  
 | 
//    [SerializeField] Text m_NameText;  
 | 
//    [SerializeField] AvatarCell m_ChatIcon;  
 | 
//    [SerializeField] ImageFitterText m_ImageFitter;  
 | 
  
 | 
//    public override void Refresh(CellView cell)  
 | 
//    {  
 | 
//        var _index = cell.index;  
 | 
//        int _playerId = ChatCtrl.Inst.PteChatID;  
 | 
//        var _list = ChatCtrl.Inst.GetChatInfo(_playerId);  
 | 
//        if (_list != null && _index < _list.Count)  
 | 
//        {  
 | 
//            ChatFriendData chat = _list[_index];  
 | 
//            m_ChatText.text = chat.content;  
 | 
//            if (type == ScrollerDataType.Header)  
 | 
//            {  
 | 
//                m_ChatText.AutoNewLine = false;  
 | 
//                if (m_ChatText.preferredWidth > m_ChatText.rectTransform.rect.width)  
 | 
//                {  
 | 
//                    m_ChatText.alignment = TextAnchor.UpperLeft;  
 | 
//                }  
 | 
//                else  
 | 
//                {  
 | 
//                    m_ChatText.alignment = TextAnchor.UpperRight;  
 | 
//                }  
 | 
//                m_ChatText.AutoNewLine = true;  
 | 
//            }  
 | 
//            m_ImageFitter.FiterRealTxtWidth = m_ChatText.alignment == TextAnchor.UpperRight;  
 | 
//            m_VipText.text = chat.vipLv > 0 ? StringUtility.Contact("V", chat.vipLv) : string.Empty;  
 | 
//            m_NameText.text = chat.name;  
 | 
//            m_ChatIcon.InitUI(AvatarHelper.GetAvatarModel(chat.player, chat.face, chat.facePic, chat.job));  
 | 
//            m_ChatText.text = chat.content;  
 | 
//        }  
 | 
//    }  
 | 
//} 
 |