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/GuildScoreInfo.cs | |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs')
| -rw-r--r-- | Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs b/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs new file mode 100644 index 00000000..57ec0f12 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs @@ -0,0 +1,53 @@ +using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class GuildScoreInfo
+ {
+ public int Index
+ {
+ get
+ {
+ return this.m_index;
+ }
+ }
+
+ private Transform m_transform;
+
+ private IXUILabel m_Score;
+
+ private IXUILabel m_Value;
+
+ private IXUIButton m_Go;
+
+ private int m_index;
+
+ public void Init(Transform t, int index)
+ {
+ this.m_transform = t;
+ this.m_index = index;
+ this.m_Score = (t.Find("Score").GetComponent("XUILabel") as IXUILabel);
+ this.m_Value = (t.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_Go = (t.Find("Go").GetComponent("XUIButton") as IXUIButton);
+ this.m_Go.ID = (ulong)((long)this.m_index);
+ }
+
+ public void SetInfo(uint score, uint value)
+ {
+ this.m_Score.SetText(score.ToString());
+ this.m_Value.SetText(value.ToString());
+ }
+
+ public void RegisterClickEventHandler(ButtonClickEventHandler click)
+ {
+ this.m_Go.RegisterClickEventHandler(click);
+ }
+
+ public void Destroy()
+ {
+ this.m_Go.RegisterClickEventHandler(null);
+ }
+ }
+}
|
