From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/CreateChatGroupDlg.cs | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/CreateChatGroupDlg.cs (limited to 'Client/Assets/Scripts/XMainClient/CreateChatGroupDlg.cs') diff --git a/Client/Assets/Scripts/XMainClient/CreateChatGroupDlg.cs b/Client/Assets/Scripts/XMainClient/CreateChatGroupDlg.cs new file mode 100644 index 00000000..01e23950 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/CreateChatGroupDlg.cs @@ -0,0 +1,75 @@ +using System; +using UILib; +using XMainClient.UI.UICommon; + +namespace XMainClient +{ + public class CreateChatGroupDlg : DlgBase + { + public override string fileName + { + get + { + return "GameSystem/ChatCreateDlg"; + } + } + + public override int layer + { + get + { + return 100; + } + } + + public override bool isHideChat + { + get + { + return false; + } + } + + public override bool autoload + { + get + { + return true; + } + } + + private CreatechatGroupCall callback; + + protected override void OnShow() + { + base.OnShow(); + } + + public void SetCallBack(CreatechatGroupCall handle) + { + this.callback = handle; + } + + public override void RegisterEvent() + { + base.uiBehaviour.m_OKButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoOK)); + base.uiBehaviour.m_sprClose.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.DoCancel)); + } + + private bool DoOK(IXUIButton go) + { + string text = base.uiBehaviour.m_Label.GetText(); + bool flag = this.callback != null && this.callback(text); + if (flag) + { + this.SetVisible(false, true); + } + return true; + } + + private void DoCancel(IXUISprite spr) + { + this.SetVisible(false, true); + } + } +} -- cgit v1.1-26-g67d0