blob: 20958daec9b860831088a988959e85d84191462a (
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
|
using System;
using KKSG;
using UILib;
using UnityEngine;
namespace XMainClient
{
internal class XTeamCreateTeamWindow
{
private GameObject PanelObject;
private XTeamDocument _doc;
private IXUIInput m_Input;
private IXUILabel m_Title;
public XTeamCreateTeamWindow(GameObject panelGo)
{
this.PanelObject = panelGo;
this.m_Input = (this.PanelObject.transform.Find("CreateMenu/PwdInput").GetComponent("XUIInput") as IXUIInput);
this.m_Title = (this.PanelObject.transform.Find("CreateMenu/Dungeon").GetComponent("XUILabel") as IXUILabel);
this._doc = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
this.RegisterEvent();
}
public void RegisterEvent()
{
IXUIButton ixuibutton = this.PanelObject.transform.Find("CreateMenu/OK").GetComponent("XUIButton") as IXUIButton;
ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKBtnClicked));
IXUIButton ixuibutton2 = this.PanelObject.transform.Find("CreateMenu/Cancel").GetComponent("XUIButton") as IXUIButton;
ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCancelBtnClicked));
}
public void Show()
{
this.PanelObject.SetActive(true);
this.m_Input.SetText("");
this.m_Title.SetText(this._doc.currentDungeonName);
}
public void Hide()
{
this.PanelObject.SetActive(false);
}
private bool _OnOKBtnClicked(IXUIButton btn)
{
string text = this.m_Input.GetText();
this._doc.password = text;
this._doc.ReqTeamOp(TeamOperate.TEAM_CREATE, 0UL, null, TeamMemberType.TMT_NORMAL, null);
this.Hide();
return true;
}
private bool _OnCancelBtnClicked(IXUIButton btn)
{
this.Hide();
return true;
}
}
}
|