blob: 36a4810aedc0d24621fc304662851d38db933c87 (
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
using System;
using UILib;
using XMainClient.UI;
using XUtliPoolLib;
namespace XMainClient
{
internal class GuildRelaxJokerMatchHandler : GuildRelaxChildHandler
{
private XGuildJockerMatchDocument _Doc;
private IXUIButton m_enterButton;
private IXUIButton m_openButton;
private IXUILabel m_timeLabel;
private IXUILabel m_timeTips;
private IXUILabel m_topLabel;
private IXUILabel m_centerLabel;
private IXUILabel m_enterLabel;
private IXUILabel m_openLabel;
private bool m_repositionNow = false;
protected override void Init()
{
base.Init();
this.m_moduleID = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_GuildRelax_JokerMatch);
this._Doc = XDocuments.GetSpecificDocument<XGuildJockerMatchDocument>(XGuildJockerMatchDocument.uuID);
this.m_qa.SetActive(true);
this.m_enterButton = (base.transform.Find("QA/Enter").GetComponent("XUIButton") as IXUIButton);
this.m_enterLabel = (base.transform.Find("QA/Enter/T1").GetComponent("XUILabel") as IXUILabel);
this.m_enterLabel.SetText(XStringDefineProxy.GetString("GUILD_JOCKER_MATCH_JOIN"));
this.m_openButton = (base.transform.Find("QA/Open").GetComponent("XUIButton") as IXUIButton);
this.m_openLabel = (base.transform.Find("QA/Open/T1").GetComponent("XUILabel") as IXUILabel);
this.m_openLabel.SetText(XStringDefineProxy.GetString("GUILD_JOCKER_MATCH_BEGION"));
this.m_timeLabel = (base.transform.Find("QA/Time").GetComponent("XUILabel") as IXUILabel);
this.m_timeTips = (base.transform.Find("QA/Time/Tips").GetComponent("XUILabel") as IXUILabel);
this.m_topLabel = (base.transform.Find("QA/top").GetComponent("XUILabel") as IXUILabel);
this.m_centerLabel = (base.transform.Find("QA/center").GetComponent("XUILabel") as IXUILabel);
}
public override void RegisterEvent()
{
base.RegisterEvent();
this.m_enterButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterGameClick));
this.m_openButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOpenGameClick));
}
private bool OnOpenGameClick(IXUIButton btn)
{
this._Doc.SendJokerMatchBegion();
return false;
}
private bool OnEnterGameClick(IXUIButton btn)
{
this._Doc.SendJokerMatchJoin();
return false;
}
protected override void OnShow()
{
base.OnShow();
this._Doc.SendJokerMatchQuery();
}
public override void StackRefresh()
{
base.StackRefresh();
this._Doc.SendJokerMatchQuery();
}
public override void SetUnLockLevel()
{
base.SetUnLockLevel();
this.m_qa.SetActive(true);
this.m_tip.SetVisible(false);
this.SetUnEnable();
bool isBegin = this._Doc.IsBegin;
if (isBegin)
{
this.m_enterButton.SetVisible(true);
}
else
{
bool isCanBegin = this._Doc.IsCanBegin;
if (isCanBegin)
{
XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
this.m_openButton.SetVisible(specificDocument.Position == GuildPosition.GPOS_LEADER || specificDocument.Position == GuildPosition.GPOS_VICELEADER);
this.m_centerLabel.SetVisible(specificDocument.Position != GuildPosition.GPOS_LEADER && specificDocument.Position != GuildPosition.GPOS_VICELEADER);
this.m_centerLabel.SetText(XStringDefineProxy.GetString("GUILD_JOCKER_MATCH_STEP2"));
}
else
{
bool flag = this._Doc.TimeLeft > 0.0;
if (flag)
{
this.m_timeLabel.SetVisible(true);
this.m_timeLabel.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)this._Doc.TimeLeft, 3, 3, 4, false, true));
this.m_repositionNow = true;
}
else
{
this.m_centerLabel.SetVisible(true);
this.m_centerLabel.SetText(XStringDefineProxy.GetString("GUILD_JOCKER_MATCH_STEP1"));
}
}
}
}
private void SetUnEnable()
{
this.m_enterButton.SetVisible(false);
this.m_openButton.SetVisible(false);
this.m_timeLabel.SetVisible(false);
this.m_timeTips.SetVisible(false);
this.m_topLabel.SetVisible(false);
this.m_centerLabel.SetVisible(false);
this.m_repositionNow = false;
}
public override void RefreshRedPoint()
{
this.m_redPoint.SetActive(this._Doc.bAvaiableIconWhenShow);
}
public override void OnUpdate()
{
base.OnUpdate();
bool flag = !this.m_repositionNow;
if (!flag)
{
bool flag2 = this._Doc.TimeLeft > 0.0;
if (flag2)
{
this.m_timeLabel.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)this._Doc.TimeLeft, 3, 3, 4, false, true));
}
else
{
this.RefreshData();
}
}
}
}
}
|