diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs | 39 |
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);
+ }
+ }
+}
|