主页面相关内容和快捷键修改
This commit is contained in:
@@ -24,6 +24,7 @@ namespace NBF
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
{
|
||||
if (!IsTop) return;
|
||||
if (action == InputDef.UI.SubPrev)
|
||||
{
|
||||
}
|
||||
@@ -46,59 +47,11 @@ namespace NBF
|
||||
|
||||
private void UseBottomMenu()
|
||||
{
|
||||
BottomMenu.OnTab += () =>
|
||||
{
|
||||
var i = Random.Range(1, 13);
|
||||
if (i < 3)
|
||||
{
|
||||
Notices.Success("离开晶科科技看就看");
|
||||
}
|
||||
else if (i < 6)
|
||||
{
|
||||
Notices.Warning("离开晶科科技看就看");
|
||||
}
|
||||
else if (i < 9)
|
||||
{
|
||||
Notices.Error("离开晶科科技看就看");
|
||||
}
|
||||
else if (i < 12)
|
||||
{
|
||||
Notices.Info("离开晶科科技看就看");
|
||||
}
|
||||
};
|
||||
BottomMenu.OnBack += OnBack;
|
||||
BottomMenu.OnEnter += OnApplySettings;
|
||||
BottomMenu.Use();
|
||||
}
|
||||
|
||||
private void OnApplySettings()
|
||||
{
|
||||
}
|
||||
|
||||
private void OnBack()
|
||||
{
|
||||
if (Settings.Instance.HaveNotAppleSettings())
|
||||
{
|
||||
MessageBox.Show("还有未保存的信息", (b) =>
|
||||
{
|
||||
if (b)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
BottomMenu.Use(this);
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
BottomMenu.OnBack -= OnBack;
|
||||
// BottomMenu.OnTab -= OnResetSettings;
|
||||
BottomMenu.OnEnter -= OnApplySettings;
|
||||
BottomMenu.UnUse();
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace NBF
|
||||
UIObjectFactory.SetPackageItemExtension(BottomMenu.URL, typeof(BottomMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(ClassifyList.URL, typeof(ClassifyList));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonMenu.URL, typeof(CommonMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(MarqueeTag.URL, typeof(MarqueeTag));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnTextInputControl.URL, typeof(BtnTextInputControl));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnTitleInputControl.URL, typeof(BtnTitleInputControl));
|
||||
UIObjectFactory.SetPackageItemExtension(NoticeItem.URL, typeof(NoticeItem));
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace NBF
|
||||
UIObjectFactory.SetPackageItemExtension(HomeMainPage.URL, typeof(HomeMainPage));
|
||||
UIObjectFactory.SetPackageItemExtension(HomeActivityPage.URL, typeof(HomeActivityPage));
|
||||
UIObjectFactory.SetPackageItemExtension(HomeRankPage.URL, typeof(HomeRankPage));
|
||||
UIObjectFactory.SetPackageItemExtension(HomeStatisticsPage.URL, typeof(HomeStatisticsPage));
|
||||
UIObjectFactory.SetPackageItemExtension(HomeButtonGroups.URL, typeof(HomeButtonGroups));
|
||||
}
|
||||
}
|
||||
|
||||
27
Assets/Scripts/UI/Common/MarqueeTag.Designer.cs
generated
Normal file
27
Assets/Scripts/UI/Common/MarqueeTag.Designer.cs
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class MarqueeTag
|
||||
{
|
||||
public const string URL = "ui://6hgkvlaulvqll9";
|
||||
|
||||
public GRichTextField TextContent1;
|
||||
public GRichTextField TextContent2;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
TextContent1 = (GRichTextField)GetChild("TextContent1");
|
||||
TextContent2 = (GRichTextField)GetChild("TextContent2");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/MarqueeTag.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Common/MarqueeTag.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a9cfe2c247599a4aacfea389e45ce14
|
||||
15
Assets/Scripts/UI/Common/MarqueeTag.cs
Normal file
15
Assets/Scripts/UI/Common/MarqueeTag.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class MarqueeTag : GComponent
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/MarqueeTag.cs.meta
Normal file
2
Assets/Scripts/UI/Common/MarqueeTag.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70a1e1d821a7bc24e8eac7cc9bbf074b
|
||||
@@ -9,10 +9,7 @@ namespace NBF
|
||||
{
|
||||
public partial class BottomMenu : GComponent
|
||||
{
|
||||
public event Action OnBack;
|
||||
public event Action OnEnter;
|
||||
public event Action OnTab;
|
||||
public event Action OnUse;
|
||||
private IUIPanel _panel;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
@@ -26,27 +23,18 @@ namespace NBF
|
||||
item.OnAction?.Invoke();
|
||||
}
|
||||
|
||||
public void UnUse()
|
||||
{
|
||||
OnBack = null;
|
||||
OnEnter = null;
|
||||
OnTab = null;
|
||||
OnUse = null;
|
||||
|
||||
InputManager.OnUICanceled -= OnAction;
|
||||
}
|
||||
|
||||
public void Use()
|
||||
public void Use(IUIPanel panel)
|
||||
{
|
||||
_panel = panel;
|
||||
List.RemoveChildrenToPool();
|
||||
LeftList.RemoveChildrenToPool();
|
||||
|
||||
InputManager.OnUICanceled += OnAction;
|
||||
|
||||
AddButtonItem(OnUse, "");
|
||||
AddButtonItem(OnTab, InputDef.UI.Tab);
|
||||
AddButtonItem(OnEnter, InputDef.UI.Enter);
|
||||
AddButtonItem(OnBack, InputDef.UI.Back);
|
||||
// AddButtonItem(OnUse, "");
|
||||
// AddButtonItem(OnTab, InputDef.UI.Tab);
|
||||
// AddButtonItem(OnEnter, InputDef.UI.Enter);
|
||||
// AddButtonItem(OnBack, InputDef.UI.Back);
|
||||
}
|
||||
|
||||
private void AddButtonItem(Action action, string actionName)
|
||||
@@ -63,6 +51,7 @@ namespace NBF
|
||||
|
||||
private void OnAction(string action)
|
||||
{
|
||||
if (_panel == null || !_panel.IsShowing || !_panel.IsTop) return;
|
||||
var children = List.GetChildren();
|
||||
foreach (var child in children)
|
||||
{
|
||||
|
||||
3
Assets/Scripts/UI/Common/Panel.meta
Normal file
3
Assets/Scripts/UI/Common/Panel.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 059888fe216d4a789f01c3289be01645
|
||||
timeCreated: 1748933992
|
||||
20
Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs
generated
Normal file
20
Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
/// <summary> </summary>
|
||||
public partial class CommonTopPanel
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
[AutoFind(Name = "Marquee")]
|
||||
public MarqueeTag Marquee;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbb8f680eb100a84c957fad39fae2e96
|
||||
49
Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs
Normal file
49
Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class CommonTopPanel : UIPanel
|
||||
{
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "CommonTopPanel";
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
ContentPane.sortingOrder = UIDef.UIOrder.CommonTopPanel;
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
InputManager.OnUICanceled += OnUICanceled;
|
||||
}
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
{
|
||||
if (action == InputDef.UI.Back)
|
||||
{
|
||||
var uis = UI.Inst.GetAllUI();
|
||||
foreach (var ui in uis)
|
||||
{
|
||||
if (ui.ContentPane.sortingOrder > 0) continue;
|
||||
if (ui.IsTop && !IsDontBack)
|
||||
{
|
||||
ui.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs.meta
Normal file
2
Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b07b25d31dce1224e913094a95196cbb
|
||||
@@ -53,8 +53,9 @@ namespace NBF
|
||||
ShowAnim = UIPanelAnimation.GetCenterScaleBig(this);
|
||||
HideAnim = UIPanelAnimation.GetCenterScaleBig(this, true);
|
||||
IsModal = true;
|
||||
IsDontBack = true;
|
||||
}
|
||||
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
TextTitle.text = _title;
|
||||
3
Assets/Scripts/UI/FishBag.meta
Normal file
3
Assets/Scripts/UI/FishBag.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4021be5a688e4880815366add9c9e2fd
|
||||
timeCreated: 1748941707
|
||||
22
Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs
generated
Normal file
22
Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs
generated
Normal file
@@ -0,0 +1,22 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
/// <summary> </summary>
|
||||
public partial class FishBagPanel
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
[AutoFind(Name = "back")]
|
||||
public GImage back;
|
||||
[AutoFind(Name = "BottomMenu")]
|
||||
public BottomMenu BottomMenu;
|
||||
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55a42f040765e1948898ff81902abff4
|
||||
33
Assets/Scripts/UI/FishBag/FishBagPanel.cs
Normal file
33
Assets/Scripts/UI/FishBag/FishBagPanel.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class FishBagPanel : UIPanel
|
||||
{
|
||||
public override string UIPackName => "Main";
|
||||
public override string UIResName => "FishBagPanel";
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/FishBag/FishBagPanel.cs.meta
Normal file
2
Assets/Scripts/UI/FishBag/FishBagPanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6de4d8117b1b09340b4d11dd47e74b32
|
||||
@@ -14,6 +14,7 @@ namespace NBF
|
||||
protected override void OnInit()
|
||||
{
|
||||
IsShowCursor = false;
|
||||
IsDontBack = true;
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
|
||||
@@ -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
|
||||
@@ -26,7 +26,7 @@ namespace NBF
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
ContentPane.sortingOrder = UIDef.UIOrder.Loading;
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
|
||||
3
Assets/Scripts/UI/Make.meta
Normal file
3
Assets/Scripts/UI/Make.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40364b7c47864017827ec33f9d7333b1
|
||||
timeCreated: 1748941666
|
||||
24
Assets/Scripts/UI/Make/MakePanel.Designer.cs
generated
Normal file
24
Assets/Scripts/UI/Make/MakePanel.Designer.cs
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
/// <summary> </summary>
|
||||
public partial class MakePanel
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
[AutoFind(Name = "back")]
|
||||
public GImage back;
|
||||
[AutoFind(Name = "Menu")]
|
||||
public CommonMenu Menu;
|
||||
[AutoFind(Name = "BottomMenu")]
|
||||
public BottomMenu BottomMenu;
|
||||
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Make/MakePanel.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Make/MakePanel.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0325840d66749994ca0ba6436eaef4aa
|
||||
33
Assets/Scripts/UI/Make/MakePanel.cs
Normal file
33
Assets/Scripts/UI/Make/MakePanel.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class MakePanel : UIPanel
|
||||
{
|
||||
public override string UIPackName => "Main";
|
||||
public override string UIResName => "MakePanel";
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Make/MakePanel.cs.meta
Normal file
2
Assets/Scripts/UI/Make/MakePanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12d3dad5e220cfd47907482e50d15e13
|
||||
22
Assets/Scripts/UI/MapPanel.Designer.cs
generated
Normal file
22
Assets/Scripts/UI/MapPanel.Designer.cs
generated
Normal file
@@ -0,0 +1,22 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
/// <summary> </summary>
|
||||
public partial class MapPanel
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
[AutoFind(Name = "back")]
|
||||
public GImage back;
|
||||
[AutoFind(Name = "BottomMenu")]
|
||||
public BottomMenu BottomMenu;
|
||||
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/MapPanel.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/MapPanel.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4254804b3cc16d44bcafcd96139ab90
|
||||
33
Assets/Scripts/UI/MapPanel.cs
Normal file
33
Assets/Scripts/UI/MapPanel.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class MapPanel : UIPanel
|
||||
{
|
||||
public override string UIPackName => "Main";
|
||||
public override string UIResName => "MapPanel";
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/MapPanel.cs.meta
Normal file
2
Assets/Scripts/UI/MapPanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69a29998a66d1ec4cb15ebb8e5de9cb6
|
||||
@@ -21,6 +21,7 @@ namespace NBF
|
||||
{
|
||||
base.OnInit();
|
||||
IsShowCursor = true;
|
||||
IsDontBack = true;
|
||||
|
||||
var groupNames = Settings.Instance.GetAllGroups();
|
||||
foreach (var group in groupNames)
|
||||
@@ -73,29 +74,7 @@ namespace NBF
|
||||
|
||||
private void UseBottomMenu()
|
||||
{
|
||||
BottomMenu.OnTab += () =>
|
||||
{
|
||||
var i = Random.Range(1, 13);
|
||||
if (i < 3)
|
||||
{
|
||||
Notices.Success("离开晶科科技看就看");
|
||||
}
|
||||
else if (i < 6)
|
||||
{
|
||||
Notices.Warning("离开晶科科技看就看");
|
||||
}
|
||||
else if (i < 9)
|
||||
{
|
||||
Notices.Error("离开晶科科技看就看");
|
||||
}
|
||||
else if (i < 12)
|
||||
{
|
||||
Notices.Info("离开晶科科技看就看");
|
||||
}
|
||||
};
|
||||
BottomMenu.OnBack += OnBack;
|
||||
BottomMenu.OnEnter += OnApplySettings;
|
||||
BottomMenu.Use();
|
||||
BottomMenu.Use(this);
|
||||
}
|
||||
|
||||
private void OnApplySettings()
|
||||
@@ -149,6 +128,14 @@ namespace NBF
|
||||
SetListSelected(List.selectedIndex + 1);
|
||||
}
|
||||
}
|
||||
else if (action == InputDef.UI.Back)
|
||||
{
|
||||
OnBack();
|
||||
}
|
||||
else if (action == InputDef.UI.Enter)
|
||||
{
|
||||
OnApplySettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetListSelected(int selectedIndex)
|
||||
@@ -181,7 +168,6 @@ namespace NBF
|
||||
|
||||
private void OnBack()
|
||||
{
|
||||
|
||||
if (Settings.Instance.HaveNotAppleSettings())
|
||||
{
|
||||
MessageBox.Show("还有未保存的信息", (b) =>
|
||||
@@ -201,10 +187,6 @@ namespace NBF
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
BottomMenu.OnBack -= OnBack;
|
||||
BottomMenu.OnTab -= OnResetSettings;
|
||||
BottomMenu.OnEnter -= OnApplySettings;
|
||||
BottomMenu.UnUse();
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,11 +47,9 @@ namespace NBF
|
||||
|
||||
private void UseBottomMenu()
|
||||
{
|
||||
BottomMenu.OnBack += Hide;
|
||||
|
||||
BottomMenu.Use();
|
||||
BottomMenu.Use(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ChangeTab(int index)
|
||||
{
|
||||
@@ -81,12 +79,6 @@ namespace NBF
|
||||
// }
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
BottomMenu.UnUse();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
|
||||
Reference in New Issue
Block a user