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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
using System;
using System.Collections.Generic;
using UILib;
using UnityEngine;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient.UI
{
internal class TaJieHelpDlg : DlgBase<TaJieHelpDlg, TaJieHelpBehaviour>
{
public override string fileName
{
get
{
return "GameSystem/TajiebbDlg";
}
}
public override bool autoload
{
get
{
return true;
}
}
public override bool hideMainMenu
{
get
{
return true;
}
}
public override bool pushstack
{
get
{
return true;
}
}
public override bool fullscreenui
{
get
{
return true;
}
}
private TaJieHelpDocument m_doc;
private List<TaJieHelpTab.RowData> m_tempData;
protected override void OnLoad()
{
base.OnLoad();
}
public override void RegisterEvent()
{
base.RegisterEvent();
base.uiBehaviour.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
}
protected override void OnUnload()
{
base.OnUnload();
}
protected override void Init()
{
base.Init();
this.m_doc = TaJieHelpDocument.Doc;
base.uiBehaviour.m_wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
}
protected override void OnHide()
{
base.OnHide();
}
protected override void OnShow()
{
base.OnShow();
this.FillContent();
}
public override void StackRefresh()
{
base.StackRefresh();
this.FillContent();
}
private void FillContent()
{
this.m_tempData = this.m_doc.GetTaJieHelpData();
base.uiBehaviour.m_wrapContent.SetContentCount(this.m_tempData.Count, false);
}
private void WrapContentItemUpdated(Transform t, int index)
{
TaJieHelpTab.RowData rowData = this.m_tempData[index];
bool flag = rowData == null;
if (!flag)
{
IXUISprite ixuisprite = t.Find("BQ").GetComponent("XUISprite") as IXUISprite;
ixuisprite.spriteName = rowData.IconName;
IXUILabel ixuilabel = t.Find("Label1").GetComponent("XUILabel") as IXUILabel;
string text = rowData.Name;
bool flag2 = rowData.SysID == 0u;
if (flag2)
{
text = this.m_doc.GetSceneName();
}
ixuilabel.SetText(text);
ixuilabel = (t.Find("Label2").GetComponent("XUILabel") as IXUILabel);
IXUILabel ixuilabel2 = t.Find("Label3").GetComponent("XUILabel") as IXUILabel;
ixuilabel2.gameObject.SetActive(false);
int curType = this.m_doc.CurType;
bool flag3 = rowData.SysID == 0u && curType == 18;
if (flag3)
{
ixuilabel.SetText(this.m_doc.GetdDragonTips());
}
else
{
ixuilabel.SetText(rowData.Des);
}
IXUIButton ixuibutton = t.Find("GO").GetComponent("XUIButton") as IXUIButton;
ixuibutton.ID = (ulong)rowData.SysID;
ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoClick));
ixuilabel = (t.Find("GO/MoneyCost").GetComponent("XUILabel") as IXUILabel);
bool flag4 = rowData.SysID == 0u;
if (flag4)
{
ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString("CheckTheStrategy"));
}
else
{
ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString("PVPActivity_Go"));
}
}
}
private bool OnCloseClicked(IXUIButton btn)
{
string label = XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("TaJieHelpTips4"));
XSingleton<UiUtility>.singleton.ShowModalDialog(label, XSingleton<XStringTable>.singleton.GetString("CloseUp"), XSingleton<XStringTable>.singleton.GetString("PackUp"), new ButtonClickEventHandler(this.DoOK), new ButtonClickEventHandler(this.DoCancle), false, XTempTipDefine.OD_START, 50);
return true;
}
private bool DoOK(IXUIButton btn)
{
XSingleton<UiUtility>.singleton.CloseModalDlg();
this.SetVisible(false, true);
this.m_doc.ShowHallBtn = false;
return true;
}
private bool DoCancle(IXUIButton btn)
{
XSingleton<UiUtility>.singleton.CloseModalDlg();
this.SetVisible(false, true);
return true;
}
private bool OnGoClick(IXUIButton btn)
{
ulong id = btn.ID;
bool flag = id == 0UL;
if (flag)
{
string url = this.m_doc.GetUrl();
bool flag2 = url != string.Empty;
if (flag2)
{
XSingleton<UiUtility>.singleton.OpenUrl(url, false);
}
else
{
XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("NoStrategy"), "fece00");
}
}
else
{
XSingleton<XGameSysMgr>.singleton.OpenSystem((int)id);
}
return true;
}
}
}
|