From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/XBackFlowPrivilegeHandler.cs | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XBackFlowPrivilegeHandler.cs (limited to 'Client/Assets/Scripts/XMainClient/XBackFlowPrivilegeHandler.cs') diff --git a/Client/Assets/Scripts/XMainClient/XBackFlowPrivilegeHandler.cs b/Client/Assets/Scripts/XMainClient/XBackFlowPrivilegeHandler.cs new file mode 100644 index 00000000..e8b0437f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XBackFlowPrivilegeHandler.cs @@ -0,0 +1,74 @@ +using System; +using UILib; +using XMainClient.UI; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XBackFlowPrivilegeHandler : DlgHandlerBase + { + protected override string FileName + { + get + { + return "Hall/BfPrivilegeHandler"; + } + } + + private IXUIButton _activityTaskBtn; + + private IXUIButton _buyReward; + + private IXUIButton _teamDetail; + + protected override void Init() + { + base.Init(); + this._activityTaskBtn = (base.transform.Find("bg/ActivityTask/BtnGo").GetComponent("XUIButton") as IXUIButton); + this._activityTaskBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.GotoActivityTask)); + this._buyReward = (base.transform.Find("bg/DoubleReward/BtnGo").GetComponent("XUIButton") as IXUIButton); + this._buyReward.RegisterClickEventHandler(new ButtonClickEventHandler(this.GotoShopping)); + this._teamDetail = (base.transform.Find("bg/TeamReward/BtnGo").GetComponent("XUIButton") as IXUIButton); + this._teamDetail.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowDetail)); + } + + public override void RegisterEvent() + { + base.RegisterEvent(); + } + + protected override void OnShow() + { + base.OnShow(); + } + + protected override void OnHide() + { + base.OnHide(); + } + + public override void OnUnload() + { + base.OnUnload(); + } + + private bool OnShowDetail(IXUIButton button) + { + DlgBase.singleton.ShowHelp(XSysDefine.Xsys_Backflow_Privilege); + return true; + } + + private bool GotoShopping(IXUIButton button) + { + XSingleton.singleton.OpenSystem(XSysDefine.XSys_Welfare_GiftBag, 0UL); + return true; + } + + private bool GotoActivityTask(IXUIButton button) + { + XSingleton.singleton.OpenSystem(XSysDefine.XSys_Mall_BackFlowShop, 0UL); + return true; + } + } +} -- cgit v1.1-26-g67d0