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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
|
using System;
using UILib;
using UnityEngine;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient.UI
{
internal class DramaDlgBehaviour : DlgBehaviourBase
{
public IXUILabel m_name;
public IUIDummy m_leftSnapshot;
public IUIDummy m_rightSnapshot;
public Vector3 m_leftDummyPos;
public Vector3 m_rightDummyPos;
public Transform m_TaskArea;
public Transform m_RewardArea;
public IXUISprite m_FuncArea;
public IXUILabel m_NpcText;
public IXUILabel m_PlayerText;
public IXUIButton m_TaskNext;
public IXUISprite m_RewardBg;
public IXUILabel m_RewardGold;
public IXUILabel m_RewardExp;
public XUIPool m_RewardItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
public IXUIButton m_RewardNext;
public Transform m_RewardItemBg;
public IXUILabel m_FuncText;
public XUIPool m_FuncPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
public Transform m_FuncTplBg;
public GameObject m_TaskAcceptArea;
public IXUIButton m_BtnAccept;
public IXUIButton m_BtnReject;
public XUIPool m_AcceptItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
public GameObject m_AcceptItemBg;
public GameObject m_OperateArea;
public GameObject m_OperateBtnPanel;
public GameObject m_OperateListPanel;
public IXUILabel m_OperateText;
public DramaDlgBehaviour.OperateButton[] m_OperateBtns = new DramaDlgBehaviour.OperateButton[4];
public DramaDlgBehaviour.OperateList[] m_OperateLists = new DramaDlgBehaviour.OperateList[4];
public int MAX_OPERATE_BTN_COUNT;
public int MAX_OPERATE_LIST_COUNT;
public GameObject m_FavorGB;
public IXUIList m_FavorBtnList;
public IXUIButton m_SendBtn;
public IXUIButton m_ExchangeBtn;
public GameObject m_ExchangeRedPoint;
public IXUILabel m_FavorText;
public Transform m_FavorFrame;
public class OperateBase
{
protected GameObject m_go;
protected XLeftTimeCounter leftTime;
protected IXUILabel leftTimeNote;
public OperateBase(GameObject go)
{
this.m_go = go;
}
public void SetActive(bool bActive)
{
this.m_go.SetActive(bActive);
}
public void SetLeftTime(float second, string note)
{
bool flag = this.leftTime != null;
if (flag)
{
this.leftTime.SetLeftTime(second, -1);
}
bool flag2 = this.leftTimeNote != null;
if (flag2)
{
this.leftTimeNote.SetText(note);
}
}
public void Update()
{
bool flag = !this.m_go.activeSelf;
if (!flag)
{
bool flag2 = this.leftTime != null;
if (flag2)
{
this.leftTime.Update();
}
}
}
}
public class OperateButton : DramaDlgBehaviour.OperateBase
{
public IXUIButton btn;
public IXUILabel text;
public OperateButton(GameObject go) : base(go)
{
this.btn = (this.m_go.transform.Find("Btn").GetComponent("XUIButton") as IXUIButton);
this.text = (this.btn.gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel);
this.leftTime = new XLeftTimeCounter(this.m_go.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel, true);
this.leftTimeNote = (this.m_go.transform.Find("LeftTime/Note").GetComponent("XUILabel") as IXUILabel);
}
public void SetButton(string buttonName, ulong id, ButtonClickEventHandler clickEvent, bool enable)
{
this.btn.ID = id;
this.btn.RegisterClickEventHandler(clickEvent);
this.btn.SetEnable(enable, false);
this.text.SetText(buttonName);
}
}
public class OperateList : DramaDlgBehaviour.OperateBase
{
public IXUISprite bg;
public IXUILabel text;
public GameObject selected;
public OperateList(GameObject go) : base(go)
{
this.bg = (this.m_go.GetComponent("XUISprite") as IXUISprite);
this.text = (this.m_go.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
this.selected = this.m_go.transform.Find("Selected").gameObject;
this.leftTime = new XLeftTimeCounter(this.m_go.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel, true);
this.leftTimeNote = (this.m_go.transform.Find("LeftTime/Note").GetComponent("XUILabel") as IXUILabel);
}
public void SetList(string name, ulong id, SpriteClickEventHandler clickEvent)
{
this.bg.ID = id;
this.bg.RegisterSpriteClickEventHandler(clickEvent);
this.text.SetText(name);
}
public void SetSelect(bool bSelect)
{
this.selected.SetActive(bSelect);
}
}
private void Awake()
{
this.m_name = (base.transform.Find("_canvas/TalkTextBg/Talker/Text").GetComponent("XUILabel") as IXUILabel);
this.m_TaskArea = base.transform.Find("_canvas/TalkTextBg/TaskText");
this.m_RewardArea = base.transform.Find("_canvas/TalkTextBg/TaskReward");
this.m_FuncArea = (base.transform.Find("_canvas/TalkTextBg/NormalFunc").GetComponent("XUISprite") as IXUISprite);
this.m_NpcText = (base.transform.Find("_canvas/TalkTextBg/TaskText/Text").GetComponent("XUILabel") as IXUILabel);
this.m_TaskNext = (base.transform.Find("_canvas/TalkTextBg/TaskText/Next").GetComponent("XUIButton") as IXUIButton);
this.m_PlayerText = (base.transform.Find("_canvas/TalkTextBg/TaskText/PlayerText").GetComponent("XUILabel") as IXUILabel);
this.m_RewardBg = (base.transform.Find("_canvas/TalkTextBg/TaskReward").GetComponent("XUISprite") as IXUISprite);
this.m_RewardGold = (base.transform.Find("_canvas/TalkTextBg/TaskReward/Gold/Value").GetComponent("XUILabel") as IXUILabel);
this.m_RewardExp = (base.transform.Find("_canvas/TalkTextBg/TaskReward/Exp/Value").GetComponent("XUILabel") as IXUILabel);
Transform transform = base.transform.Find("_canvas/TalkTextBg/TaskReward/P/ItemTpl");
this.m_RewardItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
this.m_RewardNext = (base.transform.Find("_canvas/TalkTextBg/TaskReward/Next").GetComponent("XUIButton") as IXUIButton);
this.m_RewardItemBg = base.transform.Find("_canvas/TalkTextBg/TaskReward/P");
this.m_FuncText = (base.transform.Find("_canvas/TalkTextBg/NormalFunc/Text").GetComponent("XUILabel") as IXUILabel);
transform = base.transform.Find("_canvas/TalkTextBg/NormalFunc/P/FuncTpl");
this.m_FuncPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
this.m_FuncTplBg = base.transform.Find("_canvas/TalkTextBg/NormalFunc/P");
this.m_leftSnapshot = (base.transform.Find("_canvas/LeftSnapshot").GetComponent("UIDummy") as IUIDummy);
this.m_rightSnapshot = (base.transform.Find("_canvas/RightSnapshot").GetComponent("UIDummy") as IUIDummy);
this.m_leftDummyPos = this.m_leftSnapshot.transform.localPosition;
this.m_rightDummyPos = this.m_rightSnapshot.transform.localPosition;
this.m_TaskAcceptArea = base.transform.Find("_canvas/TalkTextBg/TaskAccept").gameObject;
this.m_BtnAccept = (this.m_TaskAcceptArea.transform.Find("BtnOK").GetComponent("XUIButton") as IXUIButton);
this.m_BtnReject = (this.m_TaskAcceptArea.transform.Find("BtnCancel").GetComponent("XUIButton") as IXUIButton);
this.m_AcceptItemBg = this.m_TaskAcceptArea.transform.Find("ItemList").gameObject;
transform = this.m_AcceptItemBg.transform.Find("ItemTpl");
this.m_AcceptItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
this.m_OperateArea = base.transform.Find("_canvas/TalkTextBg/Operate").gameObject;
this.m_OperateBtnPanel = this.m_OperateArea.transform.Find("Buttons").gameObject;
this.m_OperateListPanel = this.m_OperateArea.transform.Find("List").gameObject;
this.m_OperateText = (this.m_OperateArea.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
for (int i = 0; i < 5; i++)
{
transform = this.m_OperateBtnPanel.transform.Find("Btn" + i);
bool flag = transform == null;
if (flag)
{
this.MAX_OPERATE_BTN_COUNT = i;
break;
}
this.m_OperateBtns[i] = new DramaDlgBehaviour.OperateButton(transform.gameObject);
}
for (int j = 0; j < 4; j++)
{
transform = this.m_OperateListPanel.transform.Find("List" + j);
bool flag2 = transform == null;
if (flag2)
{
this.MAX_OPERATE_LIST_COUNT = j;
break;
}
this.m_OperateLists[j] = new DramaDlgBehaviour.OperateList(transform.gameObject);
}
this.m_FavorGB = base.transform.Find("_canvas/TalkTextBg/NpcBlessing").gameObject;
this.m_FavorBtnList = (this.m_FavorGB.transform.Find("Grid").GetComponent("XUIList") as IXUIList);
this.m_SendBtn = (this.m_FavorGB.transform.Find("Grid/BtnSend").GetComponent("XUIButton") as IXUIButton);
this.m_ExchangeBtn = (this.m_FavorGB.transform.Find("Grid/BtnChange").GetComponent("XUIButton") as IXUIButton);
this.m_ExchangeRedPoint = this.m_FavorGB.transform.Find("Grid/BtnChange/RedPoint").gameObject;
this.m_FavorText = (this.m_FavorGB.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
this.m_FavorFrame = this.m_FavorGB.transform.Find("FavorFrame");
}
}
}
|