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/SevenLoginWrapItem.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs b/Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs new file mode 100644 index 00000000..1d889564 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs @@ -0,0 +1,62 @@ +using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class SevenLoginWrapItem
+ {
+ public Transform transform
+ {
+ get
+ {
+ return this.m_transform;
+ }
+ }
+
+ public Transform m_transform;
+
+ public Transform RewardParent;
+
+ public IXUILabel m_DayLabel;
+
+ public Transform m_UnGetLabel;
+
+ public Transform m_HadGetSprite;
+
+ public IXUIButton m_GetButton;
+
+ private LoginReward m_LoginReward;
+
+ public void Init(Transform tf)
+ {
+ this.m_transform = tf;
+ this.RewardParent = tf.Find("AwardList");
+ this.m_DayLabel = (tf.Find("DayLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_GetButton = (tf.Find("Response/GetButton").GetComponent("XUIButton") as IXUIButton);
+ this.m_HadGetSprite = tf.Find("Response/HadGet");
+ this.m_UnGetLabel = tf.Find("Response/UnGet");
+ }
+
+ public void Set(LoginReward reward)
+ {
+ bool flag = reward == null;
+ if (flag)
+ {
+ this.m_transform.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_transform.gameObject.SetActive(true);
+ this.m_LoginReward = reward;
+ this.m_DayLabel.SetText(this.m_LoginReward.day.ToString());
+ this.m_GetButton.ID = (ulong)((long)reward.day);
+ this.m_GetButton.gameObject.SetActive(reward.state == LoginRewardState.LOGINRS_HAVEHOT);
+ this.m_GetButton.SetEnable(true, false);
+ this.m_HadGetSprite.gameObject.SetActive(reward.state == LoginRewardState.LOGINRS_HAVE);
+ this.m_UnGetLabel.gameObject.SetActive(reward.state == LoginRewardState.LOGINRS_CANNOT);
+ }
+ }
+ }
+}
|