yyl
2025-06-09 b9751b2f076ee050fe5b685e91ae4fc4469b1015
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
 
using EnhancedUI.EnhancedScroller;
    public class ChatChannelCell : ScrollerUI
    {
        [SerializeField] Image m_Select;
        [SerializeField] Text m_ChannelName;
 
        private static Color unselectedColor = new Color32(237, 161, 13, 255);
        private static Color selectedColor = new Color32(255, 244, 205, 255);
 
        public override void Refresh(CellView cell)
        {
            var _type = (ChatInfoType)cell.index;
            if (_type == ChatInfoType.Friend)
            {
                m_ChannelName.text = Language.Get("PlayerDetail_PrivateChat");
            }
            else
            {
                m_ChannelName.text = Language.Get(StringUtility.Contact("ChatType_", _type.ToString()));
            }
            m_Select.SetActive(_type == ChatManager.Instance.presentChatType);
            m_ChannelName.color = _type == ChatManager.Instance.presentChatType ? selectedColor : unselectedColor;
        }
    }