blob: ce2d75d264a0132bccf3ac13dca1b5d0c7149a0a (
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
|
using System;
using UILib;
using UnityEngine;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient
{
internal class XLevelSealView : DlgHandlerBase
{
protected override string FileName
{
get
{
return "OperatingActivity/LevelSeal";
}
}
private IXUILabel m_NowSeal;
private IXUILabel m_Condition;
private IXUILabel m_LeftTime;
private IXUILabel m_Description;
private IXUITexture m_NowSealTex;
private GameObject m_NextSealWindow;
private IXUIButton m_NextSealBtn;
private XUIPool m_NewFunctionPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
private XLevelSealDocument doc = null;
private XLeftTimeCounter _CDCounter = null;
private bool isCountdown = false;
protected override void Init()
{
this.doc = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
this.doc.View = this;
this.m_NowSeal = (base.transform.Find("Bg/NowSeal/p/Label").GetComponent("XUILabel") as IXUILabel);
this.m_Condition = (base.transform.Find("Bg/NowSeal/p/Condition").GetComponent("XUILabel") as IXUILabel);
this.m_LeftTime = (base.transform.Find("Bg/NowSeal/p/LeftTime").GetComponent("XUILabel") as IXUILabel);
this.m_NowSealTex = (base.transform.Find("Bg/NowSeal/Tex/Tex").GetComponent("XUITexture") as IXUITexture);
this.m_Description = (base.transform.Find("Bg/NowSeal/p/Description").GetComponent("XUILabel") as IXUILabel);
this.m_NextSealBtn = (base.transform.Find("Bg/NowSeal/NextSealBtn").GetComponent("XUIButton") as IXUIButton);
this.m_NextSealWindow = base.transform.Find("Bg/NextSeal").gameObject;
}
public override void RegisterEvent()
{
this.m_NextSealBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnNextSealBtnClick));
}
protected override void OnShow()
{
base.OnShow();
this.ShowNowSeal();
this.ShowNewInfo();
this.doc.ReqGetLevelSealInfo();
}
protected override void OnHide()
{
this.m_NextSealWindow.SetActive(false);
this.m_NowSealTex.SetTexturePath("");
this._CDCounter = null;
base.OnHide();
}
public override void OnUnload()
{
this._CDCounter = null;
this.doc.View = null;
base.OnUnload();
}
public override void OnUpdate()
{
base.OnUpdate();
bool flag = this.isCountdown && this._CDCounter != null;
if (flag)
{
this._CDCounter.Update();
}
}
private bool OnNextSealGoBattleClicked(IXUIButton sp)
{
DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.SetVisible(false, true);
XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Activity, 0UL);
return true;
}
private void ShowNextLevelSeal()
{
this.doc.ShowNextLevelSeal(false, this.m_NextSealWindow.transform.position);
}
private bool OnNextSealBtnClick(IXUIButton btn)
{
this.ShowNextLevelSeal();
return true;
}
public void ShowNowSeal()
{
this.m_Condition.SetText(this.doc.GetConditionInfo());
this.m_NowSeal.SetText(this.doc.GetNowSealTitleInfo());
this.m_Description.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("SEAL_DESCRIPTION")));
DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.ShowRemoveSealLeftTime(this.m_LeftTime, ref this._CDCounter, ref this.isCountdown);
}
public void ShowNewInfo()
{
uint removeSealType = this.doc.GetRemoveSealType(XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
LevelSealTypeTable.RowData levelSealType = XLevelSealDocument.GetLevelSealType(removeSealType);
bool flag = !string.IsNullOrEmpty(levelSealType.NowSealImage);
if (flag)
{
this.m_NowSealTex.SetTexturePath(levelSealType.NowSealImage);
}
}
}
}
|