From 93349993323fbc51c4343b648f87b1a2c43eaa35 Mon Sep 17 00:00:00 2001 From: bob <605277374@qq.com> Date: Tue, 3 Jun 2025 14:28:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E7=95=8C=E9=9D=A2=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Resources/Fgui/Main/Main_fui.bytes | Bin 6931 -> 8208 bytes Assets/Scripts/UI/Bag.meta | 3 + Assets/Scripts/UI/Bag/BagPanel.Designer.cs | 24 ++++ .../Scripts/UI/Bag/BagPanel.Designer.cs.meta | 2 + Assets/Scripts/UI/Bag/BagPanel.cs | 110 ++++++++++++++++++ Assets/Scripts/UI/Bag/BagPanel.cs.meta | 2 + Assets/Scripts/UI/Binders/MainBinder.cs | 3 + Assets/Scripts/UI/Home/Com.meta | 3 + .../{ => Com}/HomeButtonGroups.Designer.cs | 0 .../HomeButtonGroups.Designer.cs.meta | 0 .../UI/Home/{ => Com}/HomeButtonGroups.cs | 4 + .../Home/{ => Com}/HomeButtonGroups.cs.meta | 0 Assets/Scripts/UI/Home/HomePanel.Designer.cs | 6 +- Assets/Scripts/UI/Home/HomePanel.cs | 67 ++++++++++- Assets/Scripts/UI/Home/Pages.meta | 3 + .../Home/Pages/HomeActivityPage.Designer.cs | 25 ++++ .../Pages/HomeActivityPage.Designer.cs.meta | 2 + .../Scripts/UI/Home/Pages/HomeActivityPage.cs | 23 ++++ .../UI/Home/Pages/HomeActivityPage.cs.meta | 2 + .../UI/Home/Pages/HomeMainPage.Designer.cs | 27 +++++ .../Home/Pages/HomeMainPage.Designer.cs.meta | 2 + Assets/Scripts/UI/Home/Pages/HomeMainPage.cs | 64 ++++++++++ .../UI/Home/Pages/HomeMainPage.cs.meta | 2 + Assets/Scripts/UI/Home/Pages/HomePageBase.cs | 48 ++++++++ .../UI/Home/Pages/HomePageBase.cs.meta | 3 + .../UI/Home/Pages/HomeRankPage.Designer.cs | 25 ++++ .../Home/Pages/HomeRankPage.Designer.cs.meta | 2 + Assets/Scripts/UI/Home/Pages/HomeRankPage.cs | 25 ++++ .../UI/Home/Pages/HomeRankPage.cs.meta | 2 + Assets/Scripts/UI/Settings/SettingPanel.cs | 1 - .../assets/Common/Com/CommonContainer.xml | 5 + FGUIProject/assets/Common/package.xml | 1 + FGUIProject/assets/Main/BagPanel.xml | 14 +++ .../Main/Com/Home/Pages/HomeActivityPage.xml | 9 ++ .../Main/Com/Home/Pages/HomeMainPage.xml | 11 ++ .../Main/Com/Home/Pages/HomeRankPage.xml | 9 ++ FGUIProject/assets/Main/HomePanel.xml | 9 +- FGUIProject/assets/Main/package.xml | 4 + .../settings/whoot/hxr7rc7plvql10.json | 1 + .../settings/whoot/hxr7rc7plvql11.json | 1 + .../settings/whoot/hxr7rc7plvql12.json | 1 + FGUIProject/settings/whoot/hxr7rc7plvqlz.json | 1 + ProjectSettings/QualitySettings.asset | 2 +- 43 files changed, 534 insertions(+), 14 deletions(-) create mode 100644 Assets/Scripts/UI/Bag.meta create mode 100644 Assets/Scripts/UI/Bag/BagPanel.Designer.cs create mode 100644 Assets/Scripts/UI/Bag/BagPanel.Designer.cs.meta create mode 100644 Assets/Scripts/UI/Bag/BagPanel.cs create mode 100644 Assets/Scripts/UI/Bag/BagPanel.cs.meta create mode 100644 Assets/Scripts/UI/Home/Com.meta rename Assets/Scripts/UI/Home/{ => Com}/HomeButtonGroups.Designer.cs (100%) rename Assets/Scripts/UI/Home/{ => Com}/HomeButtonGroups.Designer.cs.meta (100%) rename Assets/Scripts/UI/Home/{ => Com}/HomeButtonGroups.cs (87%) rename Assets/Scripts/UI/Home/{ => Com}/HomeButtonGroups.cs.meta (100%) create mode 100644 Assets/Scripts/UI/Home/Pages.meta create mode 100644 Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs create mode 100644 Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs.meta create mode 100644 Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs create mode 100644 Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs.meta create mode 100644 Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs create mode 100644 Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs.meta create mode 100644 Assets/Scripts/UI/Home/Pages/HomeMainPage.cs create mode 100644 Assets/Scripts/UI/Home/Pages/HomeMainPage.cs.meta create mode 100644 Assets/Scripts/UI/Home/Pages/HomePageBase.cs create mode 100644 Assets/Scripts/UI/Home/Pages/HomePageBase.cs.meta create mode 100644 Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs create mode 100644 Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs.meta create mode 100644 Assets/Scripts/UI/Home/Pages/HomeRankPage.cs create mode 100644 Assets/Scripts/UI/Home/Pages/HomeRankPage.cs.meta create mode 100644 FGUIProject/assets/Common/Com/CommonContainer.xml create mode 100644 FGUIProject/assets/Main/BagPanel.xml create mode 100644 FGUIProject/assets/Main/Com/Home/Pages/HomeActivityPage.xml create mode 100644 FGUIProject/assets/Main/Com/Home/Pages/HomeMainPage.xml create mode 100644 FGUIProject/assets/Main/Com/Home/Pages/HomeRankPage.xml create mode 100644 FGUIProject/settings/whoot/hxr7rc7plvql10.json create mode 100644 FGUIProject/settings/whoot/hxr7rc7plvql11.json create mode 100644 FGUIProject/settings/whoot/hxr7rc7plvql12.json create mode 100644 FGUIProject/settings/whoot/hxr7rc7plvqlz.json diff --git a/Assets/Resources/Fgui/Main/Main_fui.bytes b/Assets/Resources/Fgui/Main/Main_fui.bytes index db30877b5a3a65ec7edb36803cef91e14f73ccd6..44603d7e06bd71cdfdd08e8f8eaecef78ecea3b9 100644 GIT binary patch delta 1020 zcmcgqOKVd>6#gb}^T607CT$}UMa3@6qf{*zwRTaVl{^#|f|T15N-@2OHWutcyATCY zn|kV_wOXsyTIi;B;l@9pAi5SraH+U*=OXdU+=y-B+5_L2neTox=bL+m_Lq;AJ42zX zP|-Z52Ekdvx0?C6r4PT%xQSc1U9B)_p8zZerRlH6t$IV05>^WPT{PtjiYZ$5wbP6fmp zDB|v*MNd#n(;H86eJ@^{F^5MD9_AW6T;uxJ8MA*J)c3+d<))DNG3M!mtDPns7W&$> z&HjYt3wX+0fLeW#mdrYzy~rT53C~!vi03RxSgKWk7Cc+6IVNAwDW5V+hy2d)QnkYG z=OyzdhJboZHta?}mT17gM=a3|m0zj+No7+&@@;`#VtFkcIBUIP%a5JU$766GFO1|) zXv2D18_K~O?JkT&B^8zH(J1VCtY1oDPZfJE6fPE-i5rY@L>ykJ?;0!(j}4bDsblPV z!jPEs1Z>7981jTsaeG$N&nc}%&R~@_#^E@o4W%_bm#3AM&JMLBe*g}>y>^~exl$JN Uk?{f8v{GIhjlpS*`-=L|Z{SJWKmY&$ delta 319 zcmbQ>FxhN^rG$ts0~mc$B{8t)89^ET1@1-pr3DOZi6uFS#Rd#q K5L&MwFC74=L{UZn diff --git a/Assets/Scripts/UI/Bag.meta b/Assets/Scripts/UI/Bag.meta new file mode 100644 index 000000000..3d8503fe5 --- /dev/null +++ b/Assets/Scripts/UI/Bag.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5592fb43d74d441cad5b1867e7e5b373 +timeCreated: 1748922642 \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/BagPanel.Designer.cs b/Assets/Scripts/UI/Bag/BagPanel.Designer.cs new file mode 100644 index 000000000..c16f8c587 --- /dev/null +++ b/Assets/Scripts/UI/Bag/BagPanel.Designer.cs @@ -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 +{ + /// + public partial class BagPanel + { + 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"}; } + + + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/BagPanel.Designer.cs.meta b/Assets/Scripts/UI/Bag/BagPanel.Designer.cs.meta new file mode 100644 index 000000000..1e145d241 --- /dev/null +++ b/Assets/Scripts/UI/Bag/BagPanel.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 2bbe340594e28d34b914c388db26d526 \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/BagPanel.cs b/Assets/Scripts/UI/Bag/BagPanel.cs new file mode 100644 index 000000000..e6122b5fa --- /dev/null +++ b/Assets/Scripts/UI/Bag/BagPanel.cs @@ -0,0 +1,110 @@ +// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖 + +using UnityEngine; +using NBC; + +namespace NBF +{ + public partial class BagPanel : UIPanel + { + public override string UIPackName => "Main"; + public override string UIResName => "BagPanel"; + + protected override void OnInit() + { + base.OnInit(); + Menu.OnTabChange += ChangeTab; + } + + protected override void OnShow() + { + InputManager.OnUICanceled += OnUICanceled; + UseBottomMenu(); + } + + private void OnUICanceled(string action) + { + if (action == InputDef.UI.SubPrev) + { + } + else if (action == InputDef.UI.SubNext) + { + } + else if (action == InputDef.UI.Up) + { + } + else if (action == InputDef.UI.Down) + { + } + } + + private void ChangeTab(int index) + { + if (index < 0) return; + Log.Info($"Change tab index={index}"); + } + + 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(); + } + } + + protected override void OnHide() + { + BottomMenu.OnBack -= OnBack; + // BottomMenu.OnTab -= OnResetSettings; + BottomMenu.OnEnter -= OnApplySettings; + BottomMenu.UnUse(); + InputManager.OnUICanceled -= OnUICanceled; + } + + protected override void OnDestroy() + { + base.OnDestroy(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/BagPanel.cs.meta b/Assets/Scripts/UI/Bag/BagPanel.cs.meta new file mode 100644 index 000000000..c04e877c3 --- /dev/null +++ b/Assets/Scripts/UI/Bag/BagPanel.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 06f449f341e3a19438e38e1038fd25d5 \ No newline at end of file diff --git a/Assets/Scripts/UI/Binders/MainBinder.cs b/Assets/Scripts/UI/Binders/MainBinder.cs index 6afbd25de..a1145c6ce 100644 --- a/Assets/Scripts/UI/Binders/MainBinder.cs +++ b/Assets/Scripts/UI/Binders/MainBinder.cs @@ -10,6 +10,9 @@ namespace NBF { UIObjectFactory.SetPackageItemExtension(SettingItem.URL, typeof(SettingItem)); UIObjectFactory.SetPackageItemExtension(IntroduceTag.URL, typeof(IntroduceTag)); + UIObjectFactory.SetPackageItemExtension(HomeMainPage.URL, typeof(HomeMainPage)); + UIObjectFactory.SetPackageItemExtension(HomeActivityPage.URL, typeof(HomeActivityPage)); + UIObjectFactory.SetPackageItemExtension(HomeRankPage.URL, typeof(HomeRankPage)); UIObjectFactory.SetPackageItemExtension(HomeButtonGroups.URL, typeof(HomeButtonGroups)); } } diff --git a/Assets/Scripts/UI/Home/Com.meta b/Assets/Scripts/UI/Home/Com.meta new file mode 100644 index 000000000..e90cd87a8 --- /dev/null +++ b/Assets/Scripts/UI/Home/Com.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b5d30c3ef7804f5e9f690e364ef1afe9 +timeCreated: 1748923189 \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/HomeButtonGroups.Designer.cs b/Assets/Scripts/UI/Home/Com/HomeButtonGroups.Designer.cs similarity index 100% rename from Assets/Scripts/UI/Home/HomeButtonGroups.Designer.cs rename to Assets/Scripts/UI/Home/Com/HomeButtonGroups.Designer.cs diff --git a/Assets/Scripts/UI/Home/HomeButtonGroups.Designer.cs.meta b/Assets/Scripts/UI/Home/Com/HomeButtonGroups.Designer.cs.meta similarity index 100% rename from Assets/Scripts/UI/Home/HomeButtonGroups.Designer.cs.meta rename to Assets/Scripts/UI/Home/Com/HomeButtonGroups.Designer.cs.meta diff --git a/Assets/Scripts/UI/Home/HomeButtonGroups.cs b/Assets/Scripts/UI/Home/Com/HomeButtonGroups.cs similarity index 87% rename from Assets/Scripts/UI/Home/HomeButtonGroups.cs rename to Assets/Scripts/UI/Home/Com/HomeButtonGroups.cs index ebcde9cbc..b398adcb2 100644 --- a/Assets/Scripts/UI/Home/HomeButtonGroups.cs +++ b/Assets/Scripts/UI/Home/Com/HomeButtonGroups.cs @@ -26,6 +26,10 @@ namespace NBF { UI.Inst.OpenUI(); } + else if (btn == BtnBag) + { + UI.Inst.OpenUI(); + } } } } \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/HomeButtonGroups.cs.meta b/Assets/Scripts/UI/Home/Com/HomeButtonGroups.cs.meta similarity index 100% rename from Assets/Scripts/UI/Home/HomeButtonGroups.cs.meta rename to Assets/Scripts/UI/Home/Com/HomeButtonGroups.cs.meta diff --git a/Assets/Scripts/UI/Home/HomePanel.Designer.cs b/Assets/Scripts/UI/Home/HomePanel.Designer.cs index b42f90138..dd68e4a2c 100644 --- a/Assets/Scripts/UI/Home/HomePanel.Designer.cs +++ b/Assets/Scripts/UI/Home/HomePanel.Designer.cs @@ -11,12 +11,10 @@ namespace NBF public partial class HomePanel { public GObject this[string aKey] => ContentPane.GetChild(aKey); + [AutoFind(Name = "Pages")] + public GComponent Pages; [AutoFind(Name = "Menu")] public CommonMenu Menu; - [AutoFind(Name = "BottomMenu")] - public BottomMenu BottomMenu; - [AutoFind(Name = "OpGroup")] - public HomeButtonGroups OpGroup; public override string[] GetDependPackages(){ return new string[] {"Common"}; } diff --git a/Assets/Scripts/UI/Home/HomePanel.cs b/Assets/Scripts/UI/Home/HomePanel.cs index 1d98ac826..e62222b8a 100644 --- a/Assets/Scripts/UI/Home/HomePanel.cs +++ b/Assets/Scripts/UI/Home/HomePanel.cs @@ -1,7 +1,10 @@ // 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖 +using System.Collections.Generic; +using FairyGUI; using UnityEngine; using NBC; +using UIPanel = NBC.UIPanel; namespace NBF { @@ -9,20 +12,80 @@ namespace NBF { public override string UIPackName => "Main"; public override string UIResName => "HomePanel"; + private string[] PageNames = new[] { "HomeMainPage", "HomeActivityPage", "HomeRankPage" }; + + private List _pages = new List(); + + private HomePageBase _currentPage; + + private List tabList = new List(); protected override void OnInit() { base.OnInit(); + foreach (var group in PageNames) + { + var tab = new TabListData + { + Name = group + }; + tabList.Add(tab); + } + + + Menu.OnTabChange += ChangeTab; } protected override void OnShow() { - base.OnShow(); + Menu.SetTabs(tabList); + ChangeTab(0); } + #region Tab切换 + + private void ChangeTab(int index) + { + if (index < 0) return; + Log.Info($"Change tab index={index}"); + foreach (var page in _pages) + { + page.Hide(); + } + + var nowPage = GetPage(index); + if (nowPage != null) + { + nowPage.Show(); + _currentPage = nowPage; + } + } + + private HomePageBase GetPage(int index) + { + var page = _pages.Find(t => t.Page == index); + if (page == null) + { + var pageName = PageNames[index]; + var pageObject = UIPackage.CreateObject(UIPackName, pageName); + if (pageObject is HomePageBase homePage) + { + Pages.AddChild(homePage); + _pages.Add(homePage); + return homePage; + } + + return null; + } + + return page; + } + + #endregion + + protected override void OnHide() { - base.OnHide(); } protected override void OnDestroy() diff --git a/Assets/Scripts/UI/Home/Pages.meta b/Assets/Scripts/UI/Home/Pages.meta new file mode 100644 index 000000000..6178d53a7 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1f5d43fc98c14648867dc3b696917e65 +timeCreated: 1748923139 \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs b/Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs new file mode 100644 index 000000000..a7ebdfa98 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs @@ -0,0 +1,25 @@ +/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/ + + +using FairyGUI; +using FairyGUI.Utils; +using NBC; + +namespace NBF +{ + public partial class HomeActivityPage + { + public const string URL = "ui://hxr7rc7plvql11"; + + public BottomMenu BottomMenu; + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + BottomMenu = (BottomMenu)GetChild("BottomMenu"); + OnInited(); + UILanguage.TrySetComponentLanguage(this); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs.meta b/Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs.meta new file mode 100644 index 000000000..f1c1ebfa0 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 5cee4ebc54c0f434f9443cee69971ab3 \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs b/Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs new file mode 100644 index 000000000..5c38abfee --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs @@ -0,0 +1,23 @@ +// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖 + +using UnityEngine; +using FairyGUI; +using NBC; + +namespace NBF +{ + public partial class HomeActivityPage : HomePageBase + { + private void OnInited() + { + } + + protected override void OnShow() + { + } + + protected override void OnHide() + { + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs.meta b/Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs.meta new file mode 100644 index 000000000..1802bd362 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 7341727571ae65c4bbc3ce2bd9a94e8b \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs b/Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs new file mode 100644 index 000000000..c7706415c --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs @@ -0,0 +1,27 @@ +/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/ + + +using FairyGUI; +using FairyGUI.Utils; +using NBC; + +namespace NBF +{ + public partial class HomeMainPage + { + public const string URL = "ui://hxr7rc7plvql10"; + + public HomeButtonGroups OpGroup; + public BottomMenu BottomMenu; + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + OpGroup = (HomeButtonGroups)GetChild("OpGroup"); + BottomMenu = (BottomMenu)GetChild("BottomMenu"); + OnInited(); + UILanguage.TrySetComponentLanguage(this); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs.meta b/Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs.meta new file mode 100644 index 000000000..a5b17d20a --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 044cd5f648db2c94ea89ef77f1891ed4 \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs b/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs new file mode 100644 index 000000000..baf7bc131 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs @@ -0,0 +1,64 @@ +// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖 + +using System.Collections.Generic; +using UnityEngine; +using FairyGUI; +using NBC; + +namespace NBF +{ + public partial class HomeMainPage : HomePageBase + { + + private void OnInited() + { + } + + protected override void OnShow() + { + InputManager.OnUICanceled += OnUICanceled; + UseBottomMenu(); + } + + protected override void OnHide() + { + BottomMenu.OnBack -= OnBack; + BottomMenu.OnEnter -= OnApplySettings; + BottomMenu.UnUse(); + InputManager.OnUICanceled -= OnUICanceled; + } + + + private void OnUICanceled(string action) + { + if (action == InputDef.UI.SubPrev) + { + } + else if (action == InputDef.UI.SubNext) + { + } + else if (action == InputDef.UI.Up) + { + } + else if (action == InputDef.UI.Down) + { + } + } + + private void UseBottomMenu() + { + BottomMenu.OnBack += OnBack; + BottomMenu.OnEnter += OnApplySettings; + BottomMenu.Use(); + } + + private void OnApplySettings() + { + } + + private void OnBack() + { + UI.Inst.HideUI(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs.meta b/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs.meta new file mode 100644 index 000000000..e11cc1e77 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 648dd38953354c94a89c7c23d24abeb3 \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomePageBase.cs b/Assets/Scripts/UI/Home/Pages/HomePageBase.cs new file mode 100644 index 000000000..058061281 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomePageBase.cs @@ -0,0 +1,48 @@ +using FairyGUI; + +namespace NBF +{ + public abstract class HomePageBase : GComponent + { + public int Page; + + public void Show() + { + ShowAnimation(); + OnShow(); + } + + public void Hide() + { + if (visible) + { + HideAnimation(); + OnHide(); + } + } + + #region Anim + + private void ShowAnimation() + { + visible = true; + alpha = 0; + GTween.Kill(this); + TweenFade(1, 0.5f); + } + + private void HideAnimation() + { + GTween.Kill(this); + TweenFade(0, 0.2f).OnComplete(() => + { + visible = false; + }); + } + + #endregion + + protected abstract void OnShow(); + protected abstract void OnHide(); + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomePageBase.cs.meta b/Assets/Scripts/UI/Home/Pages/HomePageBase.cs.meta new file mode 100644 index 000000000..e27ced433 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomePageBase.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fb0a4fb73e0c4eafa11ab8028331637b +timeCreated: 1748925820 \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs b/Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs new file mode 100644 index 000000000..e796a9979 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs @@ -0,0 +1,25 @@ +/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/ + + +using FairyGUI; +using FairyGUI.Utils; +using NBC; + +namespace NBF +{ + public partial class HomeRankPage + { + public const string URL = "ui://hxr7rc7plvql12"; + + public BottomMenu BottomMenu; + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + BottomMenu = (BottomMenu)GetChild("BottomMenu"); + OnInited(); + UILanguage.TrySetComponentLanguage(this); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs.meta b/Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs.meta new file mode 100644 index 000000000..516a2112c --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: b909a0d4f6fa0b441bd779977ab6403a \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeRankPage.cs b/Assets/Scripts/UI/Home/Pages/HomeRankPage.cs new file mode 100644 index 000000000..9ffc57886 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeRankPage.cs @@ -0,0 +1,25 @@ +// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖 + +using UnityEngine; +using FairyGUI; +using NBC; + +namespace NBF +{ + public partial class HomeRankPage : HomePageBase + { + private void OnInited() + { + } + + protected override void OnShow() + { + + } + + protected override void OnHide() + { + + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeRankPage.cs.meta b/Assets/Scripts/UI/Home/Pages/HomeRankPage.cs.meta new file mode 100644 index 000000000..209fbcc46 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeRankPage.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 40506befb27a31a4786085ec5416efc7 \ No newline at end of file diff --git a/Assets/Scripts/UI/Settings/SettingPanel.cs b/Assets/Scripts/UI/Settings/SettingPanel.cs index 3e508c66a..bdcd2a267 100644 --- a/Assets/Scripts/UI/Settings/SettingPanel.cs +++ b/Assets/Scripts/UI/Settings/SettingPanel.cs @@ -94,7 +94,6 @@ namespace NBF } }; BottomMenu.OnBack += OnBack; - // BottomMenu.OnTab += OnResetSettings; BottomMenu.OnEnter += OnApplySettings; BottomMenu.Use(); } diff --git a/FGUIProject/assets/Common/Com/CommonContainer.xml b/FGUIProject/assets/Common/Com/CommonContainer.xml new file mode 100644 index 000000000..b9406532d --- /dev/null +++ b/FGUIProject/assets/Common/Com/CommonContainer.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/FGUIProject/assets/Common/package.xml b/FGUIProject/assets/Common/package.xml index 4b8f0ab42..308652779 100644 --- a/FGUIProject/assets/Common/package.xml +++ b/FGUIProject/assets/Common/package.xml @@ -191,6 +191,7 @@ + \ No newline at end of file diff --git a/FGUIProject/assets/Main/BagPanel.xml b/FGUIProject/assets/Main/BagPanel.xml new file mode 100644 index 000000000..aa2cc6d81 --- /dev/null +++ b/FGUIProject/assets/Main/BagPanel.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FGUIProject/assets/Main/Com/Home/Pages/HomeActivityPage.xml b/FGUIProject/assets/Main/Com/Home/Pages/HomeActivityPage.xml new file mode 100644 index 000000000..540f7973c --- /dev/null +++ b/FGUIProject/assets/Main/Com/Home/Pages/HomeActivityPage.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/FGUIProject/assets/Main/Com/Home/Pages/HomeMainPage.xml b/FGUIProject/assets/Main/Com/Home/Pages/HomeMainPage.xml new file mode 100644 index 000000000..c43c2a576 --- /dev/null +++ b/FGUIProject/assets/Main/Com/Home/Pages/HomeMainPage.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/FGUIProject/assets/Main/Com/Home/Pages/HomeRankPage.xml b/FGUIProject/assets/Main/Com/Home/Pages/HomeRankPage.xml new file mode 100644 index 000000000..2834f0e14 --- /dev/null +++ b/FGUIProject/assets/Main/Com/Home/Pages/HomeRankPage.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/FGUIProject/assets/Main/HomePanel.xml b/FGUIProject/assets/Main/HomePanel.xml index 6ce013797..b5e5b97ee 100644 --- a/FGUIProject/assets/Main/HomePanel.xml +++ b/FGUIProject/assets/Main/HomePanel.xml @@ -7,14 +7,11 @@ + + + - - - - - - \ No newline at end of file diff --git a/FGUIProject/assets/Main/package.xml b/FGUIProject/assets/Main/package.xml index a33414d37..be0335a70 100644 --- a/FGUIProject/assets/Main/package.xml +++ b/FGUIProject/assets/Main/package.xml @@ -33,6 +33,10 @@ + + + + \ No newline at end of file diff --git a/FGUIProject/settings/whoot/hxr7rc7plvql10.json b/FGUIProject/settings/whoot/hxr7rc7plvql10.json new file mode 100644 index 000000000..b00bfc593 --- /dev/null +++ b/FGUIProject/settings/whoot/hxr7rc7plvql10.json @@ -0,0 +1 @@ +{"url":"ui://hxr7rc7plvql10","name":"HomeMainPage","scriptType":"component","isCustomName":false,"customName":"","annotation":"","member":{}} \ No newline at end of file diff --git a/FGUIProject/settings/whoot/hxr7rc7plvql11.json b/FGUIProject/settings/whoot/hxr7rc7plvql11.json new file mode 100644 index 000000000..53b90f755 --- /dev/null +++ b/FGUIProject/settings/whoot/hxr7rc7plvql11.json @@ -0,0 +1 @@ +{"url":"ui://hxr7rc7plvql11","name":"HomeActivityPage","scriptType":"component","isCustomName":false,"customName":"","annotation":"","member":{}} \ No newline at end of file diff --git a/FGUIProject/settings/whoot/hxr7rc7plvql12.json b/FGUIProject/settings/whoot/hxr7rc7plvql12.json new file mode 100644 index 000000000..ef882a339 --- /dev/null +++ b/FGUIProject/settings/whoot/hxr7rc7plvql12.json @@ -0,0 +1 @@ +{"url":"ui://hxr7rc7plvql12","name":"HomeRankPage","scriptType":"component","isCustomName":false,"customName":"","annotation":"","member":{}} \ No newline at end of file diff --git a/FGUIProject/settings/whoot/hxr7rc7plvqlz.json b/FGUIProject/settings/whoot/hxr7rc7plvqlz.json new file mode 100644 index 000000000..48f378f47 --- /dev/null +++ b/FGUIProject/settings/whoot/hxr7rc7plvqlz.json @@ -0,0 +1 @@ +{"url":"ui://hxr7rc7plvqlz","name":"BagPanel","scriptType":"panel","isCustomName":false,"customName":"","annotation":"","member":{}} \ No newline at end of file diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index ec06e9532..26993cad6 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -130,7 +130,7 @@ QualitySettings: globalTextureMipmapLimit: 0 textureMipmapLimitSettings: [] anisotropicTextures: 2 - antiAliasing: 8 + antiAliasing: 2 softParticles: 0 softVegetation: 1 realtimeReflectionProbes: 1