blob: ae0a72d3f6fe824cc323294217a2a98043a4da59 (
plain)
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
30
31
32
33
34
35
36
37
38
39
|
using System;
using UILib;
using UnityEngine;
using XMainClient.UI.UICommon;
namespace XMainClient
{
public class ChatSystemItem : MonoBehaviour
{
private IXUILabelSymbol m_symContent;
private ChatInfo mChatInfo;
private IXUISprite m_sprRoot;
private IXUILabel m_lblContent;
private Transform m_transTitle;
private void Awake()
{
this.m_sprRoot = (base.GetComponent("XUISprite") as IXUISprite);
this.m_transTitle = base.transform.Find("title");
this.m_symContent = (base.transform.Find("title/content").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
this.m_lblContent = (this.m_symContent.gameObject.GetComponent("XUILabel") as IXUILabel);
}
public void Refresh(ChatInfo info)
{
this.mChatInfo = info;
this.m_symContent.InputText = DlgBase<ChatEmotionView, ChatEmotionBehaviour>.singleton.OnParseEmotion(info.mContent);
XLabelSymbolHelper.RegisterHyperLinkClicks(this.m_symContent);
this.m_sprRoot.spriteHeight = 56 + this.m_lblContent.spriteHeight;
int spriteHeight = this.m_sprRoot.spriteHeight;
float num = (float)spriteHeight / 2f - 23f;
this.m_transTitle.localPosition = new Vector3(-180f, num, 0f);
}
}
}
|