From b9751b2f076ee050fe5b685e91ae4fc4469b1015 Mon Sep 17 00:00:00 2001 From: yyl <yyl> Date: 星期一, 09 六月 2025 09:01:02 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts --- Main/System/Chat/ChatFriendCell.cs | 80 +++++++++++++++++++--------------------- 1 files changed, 38 insertions(+), 42 deletions(-) diff --git a/Main/System/Chat/ChatFriendCell.cs b/Main/System/Chat/ChatFriendCell.cs index 8817c3c..5d0432f 100644 --- a/Main/System/Chat/ChatFriendCell.cs +++ b/Main/System/Chat/ChatFriendCell.cs @@ -2,47 +2,43 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; -using vnxbqy.UI; -namespace EnhancedUI.EnhancedScroller -{ - // 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; - // } - // } - // } -} +//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; +// } +// } +//} -- Gitblit v1.8.0