summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs
new file mode 100644
index 00000000..ae0a72d3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs
@@ -0,0 +1,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);
+ }
+ }
+}