From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/TutorialSkipView.cs | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/TutorialSkipView.cs (limited to 'Client/Assets/Scripts/XMainClient/TutorialSkipView.cs') diff --git a/Client/Assets/Scripts/XMainClient/TutorialSkipView.cs b/Client/Assets/Scripts/XMainClient/TutorialSkipView.cs new file mode 100644 index 00000000..a87922ac --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/TutorialSkipView.cs @@ -0,0 +1,105 @@ +using System; +using UILib; +using XMainClient.UI; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class TutorialSkipView : DlgBase + { + public override string fileName + { + get + { + return "GameSystem/TutorialSkip"; + } + } + + public override int layer + { + get + { + return 1; + } + } + + public override int group + { + get + { + return 1; + } + } + + public override bool autoload + { + get + { + return true; + } + } + + public override bool hideMainMenu + { + get + { + return false; + } + } + + public override bool pushstack + { + get + { + return true; + } + } + + protected override void Init() + { + base.uiBehaviour.m_Label.SetText(XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("TUTORIAL_SKIP"))); + } + + public override void RegisterEvent() + { + base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked)); + base.uiBehaviour.m_Skip.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSkipClicked)); + base.uiBehaviour.m_NoSkip.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked)); + } + + public bool OnCloseClicked(IXUIButton btn) + { + XOptionsDocument specificDocument = XDocuments.GetSpecificDocument(XOptionsDocument.uuID); + specificDocument.SetValue(XOptionsDefine.OD_SKIP_TUTORIAL, 0, false); + this.SetVisibleWithAnimation(false, null); + XSingleton.singleton.SelectSkipTutorial = true; + return true; + } + + public bool OnSkipClicked(IXUIButton btn) + { + XOptionsDocument specificDocument = XDocuments.GetSpecificDocument(XOptionsDocument.uuID); + specificDocument.SetValue(XOptionsDefine.OD_SKIP_TUTORIAL, 1, false); + XSingleton.singleton.SkipCurrentTutorial(true); + this.SetVisibleWithAnimation(false, null); + XSingleton.singleton.SelectSkipTutorial = true; + return true; + } + + protected override void OnShow() + { + base.OnShow(); + } + + protected override void OnHide() + { + base.OnHide(); + } + + protected override void OnUnload() + { + base.OnUnload(); + } + } +} -- cgit v1.1-26-g67d0