From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/UI/XGuildBoonView.cs | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs') diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs new file mode 100644 index 00000000..b5be96b2 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using UILib; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient.UI +{ + internal class XGuildBoonView : DlgBase + { + public override string fileName + { + get + { + return "Guild/GuildSystem/GuildBoonDlg"; + } + } + + public override int layer + { + get + { + return 1; + } + } + + public override bool pushstack + { + get + { + return true; + } + } + + public override bool hideMainMenu + { + get + { + return true; + } + } + + public override bool autoload + { + get + { + return true; + } + } + + private static Dictionary _BoonBg = new Dictionary(default(XFastEnumIntEqualityComparer)); + + private XSubSysRedPointMgr redpointMgr = new XSubSysRedPointMgr(); + + static XGuildBoonView() + { + XGuildBoonView._BoonBg.Add(XSysDefine.XSys_GuildBoon_RedPacket, "gh_btn_ghhb"); + XGuildBoonView._BoonBg.Add(XSysDefine.XSys_GuildBoon_Shop, "gh_btn_ghsd"); + XGuildBoonView._BoonBg.Add(XSysDefine.XSys_GuildBoon_Salay, "gh_btn_ghhyd"); + } + + protected override void Init() + { + } + + protected override void OnUnload() + { + base.OnUnload(); + } + + protected override void OnShow() + { + base.OnShow(); + this.Refresh(); + base.uiBehaviour.m_ScrollView.ResetPosition(); + } + + public override void RegisterEvent() + { + base.RegisterEvent(); + base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick)); + } + + public override void StackRefresh() + { + base.StackRefresh(); + this.Refresh(); + } + + private bool OnCloseClick(IXUIButton button) + { + this.SetVisibleWithAnimation(false, null); + return true; + } + + public void Refresh() + { + } + + public void RefreshRedPoints() + { + this.redpointMgr.UpdateRedPointUI(); + } + + private void OnBoonClick(IXUITexture sp) + { + switch ((int)sp.ID) + { + case 830: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + break; + case 831: + DlgBase.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Guild, 0UL); + break; + case 833: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + break; + } + } + } +} -- cgit v1.1-26-g67d0