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
|
using System;
using UILib;
using UnityEngine;
using XMainClient.UI.UICommon;
namespace XMainClient.UI
{
public class ModalThreeDlg : DlgBase<ModalThreeDlg, ModalThreeDlgBehaviour>
{
public bool Deprecated { get; set; }
public override string fileName
{
get
{
return "Common/ThreeChoiceModalDlg";
}
}
public override int layer
{
get
{
return 90;
}
}
public override bool isHideChat
{
get
{
return false;
}
}
public override bool autoload
{
get
{
return true;
}
}
private ButtonClickEventHandler _bFrButtonDelegate = null;
private ButtonClickEventHandler _bSecButtonDelegate = null;
private ButtonClickEventHandler _bTrdButtonDelegate = null;
protected override void Init()
{
}
protected override void OnShow()
{
base.OnShow();
}
protected override void OnHide()
{
base.OnHide();
}
public void SetPanelDepth(int depth)
{
base.uiBehaviour.m_Panel.SetDepth(depth);
}
public void SetCloseButtonVisible(bool visible)
{
base.uiBehaviour.m_CloseButton.SetVisible(visible);
}
public void SetLabels(string mainLabel, string frLabel, string secLabel, string thdLabel)
{
base.uiBehaviour.m_LabelSymbol.InputText = "";
base.uiBehaviour.m_Label.SetText(mainLabel);
base.uiBehaviour.m_Button1.SetCaption(frLabel);
base.uiBehaviour.m_Button2.SetCaption(secLabel);
base.uiBehaviour.m_Button3.SetCaption(thdLabel);
}
public void SetLabelsWithSymbols(string mainLabel, string frLabel, string secLabel, string thdLabel)
{
base.uiBehaviour.m_LabelSymbol.InputText = mainLabel;
base.uiBehaviour.m_Button1.SetCaption(frLabel);
base.uiBehaviour.m_Button2.SetCaption(secLabel);
base.uiBehaviour.m_Button3.SetCaption(thdLabel);
}
public void SetMainLabel(string mainlabel)
{
base.uiBehaviour.m_LabelSymbol.InputText = mainlabel;
}
public void SetModalCallback(ButtonClickEventHandler handle, ButtonClickEventHandler handle2 = null, ButtonClickEventHandler handle3 = null)
{
this._bFrButtonDelegate = new ButtonClickEventHandler(this.DoCancel);
bool flag = handle != null;
if (flag)
{
this._bFrButtonDelegate = handle;
}
base.uiBehaviour.m_Button1.RegisterClickEventHandler(this._bFrButtonDelegate);
this._bSecButtonDelegate = new ButtonClickEventHandler(this.DoCancel);
bool flag2 = handle2 != null;
if (flag2)
{
this._bSecButtonDelegate = handle2;
}
base.uiBehaviour.m_Button2.RegisterClickEventHandler(this._bSecButtonDelegate);
this._bTrdButtonDelegate = new ButtonClickEventHandler(this.DoCancel);
bool flag3 = handle3 != null;
if (flag3)
{
this._bTrdButtonDelegate = handle3;
}
base.uiBehaviour.m_Button3.RegisterClickEventHandler(this._bTrdButtonDelegate);
}
public void SetTweenTargetAndPlay(GameObject go)
{
this.SetVisible(true, true);
}
public override void RegisterEvent()
{
base.uiBehaviour.m_CloseButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoClose));
}
public bool DoCancel(IXUIButton go)
{
this.SetVisible(false, true);
return true;
}
public void DoCancel(IXUISprite sp)
{
this.SetVisible(false, true);
}
public bool DoClose(IXUIButton go)
{
this.SetVisible(false, true);
return true;
}
}
}
|