From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../UI/CustomBattle/CustomBattleMatchingHandler.cs | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs') diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs new file mode 100644 index 00000000..14fb4780 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs @@ -0,0 +1,40 @@ +using System; +using UILib; + +namespace XMainClient.UI.CustomBattle +{ + internal class CustomBattleMatchingHandler : DlgHandlerBase + { + protected override string FileName + { + get + { + return "GameSystem/CustomBattle/MatchingFrame"; + } + } + + private XCustomBattleDocument _doc = null; + + private IXUIButton _cancel; + + protected override void Init() + { + base.Init(); + this._doc = XDocuments.GetSpecificDocument(XCustomBattleDocument.uuID); + this._cancel = (base.transform.Find("Cancel").GetComponent("XUIButton") as IXUIButton); + } + + public override void RegisterEvent() + { + base.RegisterEvent(); + this._cancel.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCancelButtonClicked)); + } + + private bool OnCancelButtonClicked(IXUIButton button) + { + this._doc.SendCustomBattleUnMatch(); + base.SetVisible(false); + return true; + } + } +} -- cgit v1.1-26-g67d0