blob: 1d8895648249238aa7ec058132e2126aa0afee1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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);
}
}
}
}
|