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/UI/DragonGuildLivenessRecordItem.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs new file mode 100644 index 00000000..824a3f69 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs @@ -0,0 +1,41 @@ +using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class DragonGuildLivenessRecordItem : MonoBehaviour
+ {
+ public IXUILabel m_nameLab;
+
+ public IXUILabel m_timeLab;
+
+ public IXUILabel m_contentLab;
+
+ private IXUISprite m_sprRoot;
+
+ private IXUISprite m_bgSpr;
+
+ private void Awake()
+ {
+ this.m_sprRoot = (base.GetComponent("XUISprite") as IXUISprite);
+ this.m_bgSpr = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_nameLab = (base.transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_timeLab = (base.transform.Find("Bg/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_contentLab = (base.transform.Find("Bg/Description").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void Refresh(DragonGuildLivenessRecord record)
+ {
+ bool flag = record == null;
+ if (!flag)
+ {
+ this.m_nameLab.SetText(record.Name);
+ this.m_timeLab.SetText(record.ShowTimeStr);
+ this.m_contentLab.SetText(record.ShowString);
+ this.m_sprRoot.spriteHeight = 46 + this.m_contentLab.spriteHeight;
+ this.m_bgSpr.spriteHeight = this.m_sprRoot.spriteHeight;
+ }
+ }
+ }
+}
|