From 3b50d06d004ecc31df7ecaa57927fa35c1ea608e Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期日, 28 四月 2019 16:59:23 +0800
Subject: [PATCH] 3335 修改界面功能框架。
---
System/FindPrecious/FindPreciousFrameWin.cs | 73 +++++++-----------------------------
1 files changed, 14 insertions(+), 59 deletions(-)
diff --git a/System/FindPrecious/FindPreciousFrameWin.cs b/System/FindPrecious/FindPreciousFrameWin.cs
index c64e12e..46f4edd 100644
--- a/System/FindPrecious/FindPreciousFrameWin.cs
+++ b/System/FindPrecious/FindPreciousFrameWin.cs
@@ -12,37 +12,20 @@
namespace Snxxz.UI
{
- public class FindPreciousFrameWin : Window
+ public class FindPreciousFrameWin : OneLevelWin
{
- [SerializeField] FunctionButtonGroup m_FunctionGroup;
- [SerializeField] FunctionButton m_DemonJar;
- [SerializeField] FunctionButton m_WorldBoss;
- [SerializeField] FunctionButton m_BossHome;
- [SerializeField] FunctionButton m_PersonalBoss;
- [SerializeField] FunctionButton m_ElderGodArea;
- [SerializeField] FunctionButton m_DropRecord;
-
- [SerializeField] Button m_Left;
- [SerializeField] Button m_Right;
- [SerializeField] Button m_Close;
#region Built-in
- protected override void BindController()
- {
- }
protected override void AddListeners()
{
- m_DemonJar.AddListener(ShowDemonJar);
- m_WorldBoss.AddListener(ShowWorldBoss);
- m_BossHome.AddListener(ShowBossHome);
- m_PersonalBoss.AddListener(ShowPersonalBoss);
- m_ElderGodArea.AddListener(ShowElderGodArea);
- m_DropRecord.AddListener(ShowDropRecord);
-
- m_Left.AddListener(ShowLastFunction);
- m_Right.AddListener(ShowNextFunction);
- m_Close.AddListener(CloseClick);
+ base.AddListeners();
+ SetFunctionListener(0, ShowDemonJar);
+ SetFunctionListener(1, ShowWorldBoss);
+ SetFunctionListener(2, ShowBossHome);
+ SetFunctionListener(3, ShowPersonalBoss);
+ SetFunctionListener(4, ShowElderGodArea);
+ SetFunctionListener(5, ShowDropRecord);
}
protected override void OnPreOpen()
@@ -61,20 +44,11 @@
protected override void OnAfterClose()
{
- if (!WindowJumpMgr.Instance.IsJumpState)
- {
- WindowCenter.Instance.Open<MainInterfaceWin>();
- }
}
protected override void OnActived()
{
base.OnActived();
- m_Left.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1);
- m_Right.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1);
-
- m_FunctionGroup.TriggerByOrder(functionOrder);
- m_FunctionGroup.GotoOrder(functionOrder);
}
#endregion
@@ -82,61 +56,42 @@
{
CloseSubWindows();
WindowCenter.Instance.Open<DemonJarWin>();
- functionOrder = m_DemonJar.order;
+ functionOrder = 0;
}
private void ShowWorldBoss()
{
CloseSubWindows();
WindowCenter.Instance.Open<WorldBossWin>();
- functionOrder = m_WorldBoss.order;
+ functionOrder = 1;
}
private void ShowBossHome()
{
CloseSubWindows();
WindowCenter.Instance.Open<BossHomeWin>();
- functionOrder = m_BossHome.order;
+ functionOrder = 2;
}
private void ShowPersonalBoss()
{
CloseSubWindows();
WindowCenter.Instance.Open<PersonalBossWin>();
- functionOrder = m_PersonalBoss.order;
+ functionOrder = 3;
}
private void ShowElderGodArea()
{
CloseSubWindows();
WindowCenter.Instance.Open<ElderGodAreaWin>();
- functionOrder = m_ElderGodArea.order;
+ functionOrder = 4;
}
private void ShowDropRecord()
{
CloseSubWindows();
WindowCenter.Instance.Open<PreciousDropRecordWin>();
- functionOrder = m_DropRecord.order;
- }
-
- private void CloseSubWindows()
- {
- var subWindows = WindowConfig.Get().FindChildWindows("FindPreciousFrameWin");
- foreach ( var window in subWindows )
- {
- WindowCenter.Instance.Close(window);
- }
- }
-
- private void ShowLastFunction()
- {
- m_FunctionGroup.TriggerLast();
- }
-
- private void ShowNextFunction()
- {
- m_FunctionGroup.TriggerNext();
+ functionOrder = 5;
}
}
--
Gitblit v1.8.0