From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/UI/SevenLoginWrapItem.cs | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs') 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); + } + } + } +} -- cgit v1.1-26-g67d0