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;
|
}
|
}
|