blob: 1596b9982552ceca73d5efbe4d6442fa4da6beda (
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
|
using System;
using KKSG;
using UILib;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient.UI
{
internal class YorozuyaHandler : DlgHandlerBase
{
protected override string FileName
{
get
{
return "Hall/YorozuyaHandler";
}
}
private IXUIButton m_photoBtn;
private IXUIButton m_rideBtn;
private IXUIButton m_sceneTransformBtn;
private IXUIButton m_exitBtn;
private IXUIButton m_3dBtn;
private IXUIButton m_25dBtn;
private XSwitchSight m_SwitchSight;
protected override void Init()
{
base.Init();
this.m_photoBtn = (base.PanelObject.transform.Find("Photo").GetComponent("XUIButton") as IXUIButton);
this.m_rideBtn = (base.PanelObject.transform.Find("Ride").GetComponent("XUIButton") as IXUIButton);
this.m_sceneTransformBtn = (base.PanelObject.transform.Find("SceneTransform").GetComponent("XUIButton") as IXUIButton);
this.m_exitBtn = (base.PanelObject.transform.Find("Exit").GetComponent("XUIButton") as IXUIButton);
this.m_3dBtn = (base.PanelObject.transform.Find("3d2.5d/3d").GetComponent("XUIButton") as IXUIButton);
this.m_25dBtn = (base.PanelObject.transform.Find("3d2.5d/2.5d").GetComponent("XUIButton") as IXUIButton);
}
public override void RegisterEvent()
{
base.RegisterEvent();
this.m_photoBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickYorozuyPhotoBtn));
this.m_rideBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickYorozuyRideBtn));
this.m_sceneTransformBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OpenTransUi));
this.m_exitBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickExit));
this.m_SwitchSight = new XSwitchSight(new ButtonClickEventHandler(this.OnViewClick), this.m_25dBtn, this.m_3dBtn, null);
}
protected override void OnShow()
{
base.OnShow();
bool flag = XSingleton<XOperationData>.singleton.OperationMode == XOperationMode.X3D_Free;
if (flag)
{
XSingleton<XOperationData>.singleton.OperationMode = XOperationMode.X3D;
}
this.SetView(XSingleton<XOperationData>.singleton.OperationMode);
}
protected override void OnHide()
{
base.OnHide();
}
public override void OnUnload()
{
base.OnUnload();
}
public void SetView(XOperationMode mode)
{
if (mode != XOperationMode.X25D)
{
if (mode == XOperationMode.X3D)
{
this.m_3dBtn.gameObject.SetActive(true);
this.m_25dBtn.gameObject.SetActive(false);
}
}
else
{
this.m_3dBtn.gameObject.SetActive(false);
this.m_25dBtn.gameObject.SetActive(true);
}
}
private bool OnClickYorozuyPhotoBtn(IXUIButton btn)
{
DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.SetVisible(true, true);
DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.ShowMainView();
return true;
}
private bool OnClickYorozuyRideBtn(IXUIButton btn)
{
XPetDocument specificDocument = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData.Outlook.state.type == OutLookStateType.OutLook_RidePetCopilot;
if (flag)
{
specificDocument.OnReqOffPetPairRide();
}
else
{
bool flag2 = specificDocument.Pets.Count == 0;
if (flag2)
{
XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("PET_NONE"), "fece00");
}
else
{
specificDocument.ReqRecentMount();
}
}
return true;
}
private bool OpenTransUi(IXUIButton btn)
{
DlgBase<YorozuyaDlg, YorozuyaBehaviour>.singleton.SetVisible(true, true);
return true;
}
private bool OnViewClick(IXUIButton btn)
{
this.SetView((XOperationMode)btn.ID);
return true;
}
private bool OnClickExit(IXUIButton btn)
{
SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
bool flag = sceneType != SceneType.SCENE_LEISURE;
bool result;
if (flag)
{
result = true;
}
else
{
XSingleton<XScene>.singleton.ReqLeaveScene();
result = true;
}
return result;
}
}
}
|