using vnxbqy.UI;
|
using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
namespace EnhancedUI.EnhancedScroller
|
{
|
public class ChatExtraOneCell : ScrollerUI
|
{
|
[SerializeField] RichText chatText;
|
|
ChatCenter m_ChatCenter;
|
ChatCenter chatCenter
|
{
|
get
|
{
|
return m_ChatCenter ?? (m_ChatCenter = ModelCenter.Instance.GetModel<ChatCenter>());
|
}
|
}
|
public override void Refresh(CellView cell)
|
{
|
ChatData _data = chatCenter.GetChatData(ChatCtrl.Inst.presentChatType, cell.index);
|
if (_data == null)
|
{
|
return;
|
}
|
if (_data.infoList != null)
|
{
|
chatText.SetExtenalData(_data.infoList);
|
}
|
chatText.text = _data.content;
|
switch (_data.detailType)
|
{
|
case ChatInfoType.FairyQuestion:
|
chatText.alignment = TextAnchor.MiddleLeft;
|
break;
|
default:
|
chatText.alignment = TextAnchor.MiddleCenter;
|
break;
|
}
|
}
|
}
|
}
|