主页面相关内容和快捷键修改
This commit is contained in:
@@ -11,13 +11,13 @@ namespace NBF
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7plvqln";
|
||||
|
||||
public GButton BtnMap;
|
||||
public GButton BtnMessage;
|
||||
public GButton BtnGo;
|
||||
public GButton BtnMake;
|
||||
public GButton BtnExit;
|
||||
public GButton BtnSettings;
|
||||
public GButton BtnStatistics;
|
||||
public GButton BtnFishBag;
|
||||
public GButton BtnBag;
|
||||
public GButton BtnSkill;
|
||||
public GButton BtnMap;
|
||||
public GButton BtnPass;
|
||||
public GButton BtnMission;
|
||||
public GButton BtnTournament;
|
||||
@@ -26,13 +26,13 @@ namespace NBF
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
BtnMap = (GButton)GetChild("BtnMap");
|
||||
BtnMessage = (GButton)GetChild("BtnMessage");
|
||||
BtnGo = (GButton)GetChild("BtnGo");
|
||||
BtnMake = (GButton)GetChild("BtnMake");
|
||||
BtnExit = (GButton)GetChild("BtnExit");
|
||||
BtnSettings = (GButton)GetChild("BtnSettings");
|
||||
BtnStatistics = (GButton)GetChild("BtnStatistics");
|
||||
BtnFishBag = (GButton)GetChild("BtnFishBag");
|
||||
BtnBag = (GButton)GetChild("BtnBag");
|
||||
BtnSkill = (GButton)GetChild("BtnSkill");
|
||||
BtnMap = (GButton)GetChild("BtnMap");
|
||||
BtnPass = (GButton)GetChild("BtnPass");
|
||||
BtnMission = (GButton)GetChild("BtnMission");
|
||||
BtnTournament = (GButton)GetChild("BtnTournament");
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace NBF
|
||||
{
|
||||
if (btn == BtnExit)
|
||||
{
|
||||
MessageBox.Show("确定推出到桌面吗?", (b) =>
|
||||
MessageBox.Show("确定退出吗?", (b) =>
|
||||
{
|
||||
if (b) Application.Quit();
|
||||
});
|
||||
@@ -30,6 +30,18 @@ namespace NBF
|
||||
{
|
||||
UI.Inst.OpenUI<BagPanel>();
|
||||
}
|
||||
else if (btn == BtnFishBag)
|
||||
{
|
||||
UI.Inst.OpenUI<FishBagPanel>();
|
||||
}
|
||||
else if (btn == BtnMake)
|
||||
{
|
||||
UI.Inst.OpenUI<MakePanel>();
|
||||
}
|
||||
else if (btn == BtnMap)
|
||||
{
|
||||
UI.Inst.OpenUI<MapPanel>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ namespace NBF
|
||||
var nowPage = GetPage(index);
|
||||
if (nowPage != null)
|
||||
{
|
||||
nowPage.Show();
|
||||
nowPage.Show(this);
|
||||
_currentPage = nowPage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeMainPage : HomePageBase
|
||||
{
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
@@ -22,15 +18,12 @@ namespace NBF
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
BottomMenu.OnBack -= OnBack;
|
||||
BottomMenu.OnEnter -= OnApplySettings;
|
||||
BottomMenu.UnUse();
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
}
|
||||
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
{
|
||||
if (!Panel.IsTop) return;
|
||||
if (action == InputDef.UI.SubPrev)
|
||||
{
|
||||
}
|
||||
@@ -47,18 +40,7 @@ namespace NBF
|
||||
|
||||
private void UseBottomMenu()
|
||||
{
|
||||
BottomMenu.OnBack += OnBack;
|
||||
BottomMenu.OnEnter += OnApplySettings;
|
||||
BottomMenu.Use();
|
||||
}
|
||||
|
||||
private void OnApplySettings()
|
||||
{
|
||||
}
|
||||
|
||||
private void OnBack()
|
||||
{
|
||||
UI.Inst.HideUI<HomePanel>();
|
||||
BottomMenu.Use(Panel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,11 @@ namespace NBF
|
||||
{
|
||||
public int Page;
|
||||
|
||||
public void Show()
|
||||
public HomePanel Panel;
|
||||
|
||||
public void Show(HomePanel panel)
|
||||
{
|
||||
Panel = panel;
|
||||
ShowAnimation();
|
||||
OnShow();
|
||||
}
|
||||
@@ -34,10 +37,7 @@ namespace NBF
|
||||
private void HideAnimation()
|
||||
{
|
||||
GTween.Kill(this);
|
||||
TweenFade(0, 0.2f).OnComplete(() =>
|
||||
{
|
||||
visible = false;
|
||||
});
|
||||
TweenFade(0, 0.2f).OnComplete(() => { visible = false; });
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
25
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs
generated
Normal file
25
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeStatisticsPage
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7plvql13";
|
||||
|
||||
public BottomMenu BottomMenu;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
BottomMenu = (BottomMenu)GetChild("BottomMenu");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06d572bce2eeaf24d8a2d235976dc02c
|
||||
15
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs
Normal file
15
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeStatisticsPage : GComponent
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs.meta
Normal file
2
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b12895a3e4e7fb4287cbf7a026d7887
|
||||
Reference in New Issue
Block a user