From 372e81508e7225cef96158078c1ae472a50ced8f Mon Sep 17 00:00:00 2001 From: bob <605277374@qq.com> Date: Tue, 3 Jun 2025 18:04:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E9=9D=A2=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=92=8C=E5=BF=AB=E6=8D=B7=E9=94=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Resources/Fgui/Common/Common_fui.bytes | Bin 29452 -> 30325 bytes Assets/Resources/Fgui/Main/Main_fui.bytes | Bin 8208 -> 9481 bytes .../Scripts/Common/Attrobites/Attributes.cs | 5 + Assets/Scripts/Def/UIDef.cs | 2 - Assets/Scripts/NBC/Language/Runtime/Lan.cs | 2 +- .../NBC/Language/Runtime/LanguageManager.cs | 11 +- .../NBC/UI/Runtime/Component/IUIPanel.cs | 7 +- .../NBC/UI/Runtime/Component/UIPanel.cs | 26 +- .../UILanguage/UIComponentLanguagePack.cs | 12 +- Assets/Scripts/Old.meta | 3 - Assets/Scripts/Old/InputManager.cs | 651 ------------------ Assets/Scripts/Old/InputManager.cs.meta | 3 - Assets/Scripts/Startup/App.cs | 19 + Assets/Scripts/UI/Bag/BagPanel.cs | 51 +- Assets/Scripts/UI/Binders/CommonBinder.cs | 1 + Assets/Scripts/UI/Binders/MainBinder.cs | 1 + .../BtnTextInputControl.Designer.cs | 0 .../BtnTextInputControl.Designer.cs.meta | 0 .../UI/{ => Common}/BtnTextInputControl.cs | 0 .../{ => Common}/BtnTextInputControl.cs.meta | 0 .../Scripts/UI/Common/MarqueeTag.Designer.cs | 27 + .../UI/Common/MarqueeTag.Designer.cs.meta | 2 + Assets/Scripts/UI/Common/MarqueeTag.cs | 15 + Assets/Scripts/UI/Common/MarqueeTag.cs.meta | 2 + Assets/Scripts/UI/Common/Menu/BottomMenu.cs | 27 +- Assets/Scripts/UI/Common/Panel.meta | 3 + .../Common/Panel/CommonTopPanel.Designer.cs | 20 + .../Panel/CommonTopPanel.Designer.cs.meta | 2 + .../Scripts/UI/Common/Panel/CommonTopPanel.cs | 49 ++ .../UI/Common/Panel/CommonTopPanel.cs.meta | 2 + .../UI/Common/{ => Panel}/GMPanel.Designer.cs | 0 .../{ => Panel}/GMPanel.Designer.cs.meta | 0 .../Scripts/UI/Common/{ => Panel}/GMPanel.cs | 0 .../UI/Common/{ => Panel}/GMPanel.cs.meta | 0 .../Common/{ => Panel}/MessageBox.Designer.cs | 0 .../{ => Panel}/MessageBox.Designer.cs.meta | 0 .../UI/Common/{ => Panel}/MessageBox.cs | 3 +- .../UI/Common/{ => Panel}/MessageBox.cs.meta | 0 .../UI/Common/{ => Panel}/Notices.Designer.cs | 0 .../{ => Panel}/Notices.Designer.cs.meta | 0 .../Scripts/UI/Common/{ => Panel}/Notices.cs | 0 .../UI/Common/{ => Panel}/Notices.cs.meta | 0 .../UI/{ => Common}/UILangeageConfig.cs | 0 .../UI/{ => Common}/UILangeageConfig.cs.meta | 0 Assets/Scripts/UI/FishBag.meta | 3 + .../UI/FishBag/FishBagPanel.Designer.cs | 22 + .../UI/FishBag/FishBagPanel.Designer.cs.meta | 2 + Assets/Scripts/UI/FishBag/FishBagPanel.cs | 33 + .../Scripts/UI/FishBag/FishBagPanel.cs.meta | 2 + Assets/Scripts/UI/Fishing/FishingPanel.cs | 1 + .../UI/{ => Fishing}/FishingPower.Designer.cs | 0 .../FishingPower.Designer.cs.meta | 0 .../Scripts/UI/{ => Fishing}/FishingPower.cs | 0 .../UI/{ => Fishing}/FishingPower.cs.meta | 0 .../FishingStateInfo.Designer.cs | 0 .../FishingStateInfo.Designer.cs.meta | 0 .../UI/{ => Fishing}/FishingStateInfo.cs | 0 .../UI/{ => Fishing}/FishingStateInfo.cs.meta | 0 .../UI/Home/Com/HomeButtonGroups.Designer.cs | 16 +- .../Scripts/UI/Home/Com/HomeButtonGroups.cs | 14 +- Assets/Scripts/UI/Home/HomePanel.cs | 2 +- Assets/Scripts/UI/Home/Pages/HomeMainPage.cs | 22 +- Assets/Scripts/UI/Home/Pages/HomePageBase.cs | 10 +- .../Home/Pages/HomeStatisticsPage.Designer.cs | 25 + .../Pages/HomeStatisticsPage.Designer.cs.meta | 2 + .../UI/Home/Pages/HomeStatisticsPage.cs | 15 + .../UI/Home/Pages/HomeStatisticsPage.cs.meta | 2 + Assets/Scripts/UI/Loading/LoadingPanel.cs | 2 +- Assets/Scripts/UI/Make.meta | 3 + Assets/Scripts/UI/Make/MakePanel.Designer.cs | 24 + .../UI/Make/MakePanel.Designer.cs.meta | 2 + Assets/Scripts/UI/Make/MakePanel.cs | 33 + Assets/Scripts/UI/Make/MakePanel.cs.meta | 2 + Assets/Scripts/UI/MapPanel.Designer.cs | 22 + Assets/Scripts/UI/MapPanel.Designer.cs.meta | 2 + Assets/Scripts/UI/MapPanel.cs | 33 + Assets/Scripts/UI/MapPanel.cs.meta | 2 + Assets/Scripts/UI/Settings/SettingPanel.cs | 38 +- Assets/Scripts/UI/Shops/FishingShopPanel.cs | 12 +- .../Utils/Extends/UIInputExtensions.cs | 7 + .../Utils/Extends/UIInputExtensions.cs.meta | 3 + Assets/Scripts/Utils/Reflection.cs | 30 + FGUIProject/assets/Common/Com/MarqueeTag.xml | 8 + .../assets/Common/Panel/CommonTopPanel.xml | 8 + FGUIProject/assets/Common/package.xml | 2 + .../assets/Main/Com/Home/BtnHomeMap.xml | 3 +- .../assets/Main/Com/Home/BtnHomeMedium.xml | 6 +- .../assets/Main/Com/Home/BtnHomeSmall.xml | 11 +- .../assets/Main/Com/Home/HomeButtonGroups.xml | 14 +- .../Com/Home/Pages/HomeStatisticsPage.xml | 9 + FGUIProject/assets/Main/FishBagPanel.xml | 11 + FGUIProject/assets/Main/MakePanel.xml | 14 + FGUIProject/assets/Main/MapPanel.xml | 11 + FGUIProject/assets/Main/package.xml | 4 + .../settings/whoot/6hgkvlaulvqll8.json | 1 + .../settings/whoot/6hgkvlaulvqll9.json | 1 + .../settings/whoot/hxr7rc7plvql13.json | 1 + .../settings/whoot/hxr7rc7plvql14.json | 1 + .../settings/whoot/hxr7rc7plvql15.json | 1 + .../settings/whoot/hxr7rc7plvql16.json | 1 + Fishing2.sln.DotSettings.user | 1 + 101 files changed, 607 insertions(+), 833 deletions(-) delete mode 100644 Assets/Scripts/Old.meta delete mode 100644 Assets/Scripts/Old/InputManager.cs delete mode 100644 Assets/Scripts/Old/InputManager.cs.meta rename Assets/Scripts/UI/{ => Common}/BtnTextInputControl.Designer.cs (100%) rename Assets/Scripts/UI/{ => Common}/BtnTextInputControl.Designer.cs.meta (100%) rename Assets/Scripts/UI/{ => Common}/BtnTextInputControl.cs (100%) rename Assets/Scripts/UI/{ => Common}/BtnTextInputControl.cs.meta (100%) create mode 100644 Assets/Scripts/UI/Common/MarqueeTag.Designer.cs create mode 100644 Assets/Scripts/UI/Common/MarqueeTag.Designer.cs.meta create mode 100644 Assets/Scripts/UI/Common/MarqueeTag.cs create mode 100644 Assets/Scripts/UI/Common/MarqueeTag.cs.meta create mode 100644 Assets/Scripts/UI/Common/Panel.meta create mode 100644 Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs create mode 100644 Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs.meta create mode 100644 Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs create mode 100644 Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs.meta rename Assets/Scripts/UI/Common/{ => Panel}/GMPanel.Designer.cs (100%) rename Assets/Scripts/UI/Common/{ => Panel}/GMPanel.Designer.cs.meta (100%) rename Assets/Scripts/UI/Common/{ => Panel}/GMPanel.cs (100%) rename Assets/Scripts/UI/Common/{ => Panel}/GMPanel.cs.meta (100%) rename Assets/Scripts/UI/Common/{ => Panel}/MessageBox.Designer.cs (100%) rename Assets/Scripts/UI/Common/{ => Panel}/MessageBox.Designer.cs.meta (100%) rename Assets/Scripts/UI/Common/{ => Panel}/MessageBox.cs (98%) rename Assets/Scripts/UI/Common/{ => Panel}/MessageBox.cs.meta (100%) rename Assets/Scripts/UI/Common/{ => Panel}/Notices.Designer.cs (100%) rename Assets/Scripts/UI/Common/{ => Panel}/Notices.Designer.cs.meta (100%) rename Assets/Scripts/UI/Common/{ => Panel}/Notices.cs (100%) rename Assets/Scripts/UI/Common/{ => Panel}/Notices.cs.meta (100%) rename Assets/Scripts/UI/{ => Common}/UILangeageConfig.cs (100%) rename Assets/Scripts/UI/{ => Common}/UILangeageConfig.cs.meta (100%) create mode 100644 Assets/Scripts/UI/FishBag.meta create mode 100644 Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs create mode 100644 Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs.meta create mode 100644 Assets/Scripts/UI/FishBag/FishBagPanel.cs create mode 100644 Assets/Scripts/UI/FishBag/FishBagPanel.cs.meta rename Assets/Scripts/UI/{ => Fishing}/FishingPower.Designer.cs (100%) rename Assets/Scripts/UI/{ => Fishing}/FishingPower.Designer.cs.meta (100%) rename Assets/Scripts/UI/{ => Fishing}/FishingPower.cs (100%) rename Assets/Scripts/UI/{ => Fishing}/FishingPower.cs.meta (100%) rename Assets/Scripts/UI/{ => Fishing}/FishingStateInfo.Designer.cs (100%) rename Assets/Scripts/UI/{ => Fishing}/FishingStateInfo.Designer.cs.meta (100%) rename Assets/Scripts/UI/{ => Fishing}/FishingStateInfo.cs (100%) rename Assets/Scripts/UI/{ => Fishing}/FishingStateInfo.cs.meta (100%) create mode 100644 Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs create mode 100644 Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs.meta create mode 100644 Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs create mode 100644 Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs.meta create mode 100644 Assets/Scripts/UI/Make.meta create mode 100644 Assets/Scripts/UI/Make/MakePanel.Designer.cs create mode 100644 Assets/Scripts/UI/Make/MakePanel.Designer.cs.meta create mode 100644 Assets/Scripts/UI/Make/MakePanel.cs create mode 100644 Assets/Scripts/UI/Make/MakePanel.cs.meta create mode 100644 Assets/Scripts/UI/MapPanel.Designer.cs create mode 100644 Assets/Scripts/UI/MapPanel.Designer.cs.meta create mode 100644 Assets/Scripts/UI/MapPanel.cs create mode 100644 Assets/Scripts/UI/MapPanel.cs.meta create mode 100644 Assets/Scripts/Utils/Extends/UIInputExtensions.cs create mode 100644 Assets/Scripts/Utils/Extends/UIInputExtensions.cs.meta create mode 100644 FGUIProject/assets/Common/Com/MarqueeTag.xml create mode 100644 FGUIProject/assets/Common/Panel/CommonTopPanel.xml create mode 100644 FGUIProject/assets/Main/Com/Home/Pages/HomeStatisticsPage.xml create mode 100644 FGUIProject/assets/Main/FishBagPanel.xml create mode 100644 FGUIProject/assets/Main/MakePanel.xml create mode 100644 FGUIProject/assets/Main/MapPanel.xml create mode 100644 FGUIProject/settings/whoot/6hgkvlaulvqll8.json create mode 100644 FGUIProject/settings/whoot/6hgkvlaulvqll9.json create mode 100644 FGUIProject/settings/whoot/hxr7rc7plvql13.json create mode 100644 FGUIProject/settings/whoot/hxr7rc7plvql14.json create mode 100644 FGUIProject/settings/whoot/hxr7rc7plvql15.json create mode 100644 FGUIProject/settings/whoot/hxr7rc7plvql16.json diff --git a/Assets/Resources/Fgui/Common/Common_fui.bytes b/Assets/Resources/Fgui/Common/Common_fui.bytes index 5d1c247f32ad51c09823eb3ab6f9526f6fbf3857..dbf5711ab436399add1011a8b9e61160f0a45f25 100644 GIT binary patch delta 3782 zcmZ{n3qVv=8pqFf&)gYs}I3UVJ5k!ze6afv?L><8gh;A4enyG`DWVVUg!>z4Y z^D}#F+V*0%hnl%%ZMzvgEHz&})XYdqG0QM5Ei+;N_sofH-ED?5zyJB4@0|Oc@1A*Z zPYazrNh@=sM$Z@OQJEDWUK=)zo6#$>PKtNMcG0uFjo@8tH!e?0Neak7Fo_sRB1pJJ zwAdkpAsp=&g|q!4_lS(+BO$H<8>QGO-V=t{3p!YGd1x<*8WeV`X_BK4*q1)RHDO|$V$`-uW5xev*DRzmy zdI$0_M$*y9f9b_(GTaKZIri+pqa$2(r5NoZ5iat?Fi{AnNQ@R@u}UvQPp}jE&!mFb zhaTn^L%L+CG!b(BCG)Ry*~yE2!rod0T96$%8!euj6T3Mu)|JBt^+*>V{MOtL#Yf0_ z>u=9B#C~qh>h2N;q&OfB@~geJ(8tQ5*-{)5pYWQba@xVIN#*XtBKqJ3lo6ZYQY*#~ zpYqW37}+E~<2$SpI>Pg#Q=E&XXcnKdnS7GI;AL^~9NxP|9u>#<*4`(nMLGBODRUne zGm%thG|5LI5;-hoFn!6zDFyO`_=@jId6~ZE;eE^LB(Lr3qi^^m^bRgcEvHs~By|$1 z7;SIeB~Fnbisa?wSL8^F@7+bA{(w;S}d^8h;R- z#E+cbFV;MdGXBJ4`aM7w_-MbW^s~Jwy2usjIW(6S=cSr{s-bz@oaZs;(*mt- zpoLo1(v7r;8}sAvTAJ@MZ>HaCbqg)gs*aXwwTzYrRN}348!b|w!DQh8;xBM0?3-{q z-J#=G&>wXCopcxdQN@cPI6HlQ9e+37L-%rKfyb<;KWVj+?$c@&u~w_;ey!Hf0|CV= zhdQ+PF#TDnXr~xYk7#o(t<&mJ`ioMkI*-xg^aPI@nrc2tPeIw&ZlJ#^We4C5@i%lf zA>e6x2C5nAS$YmCVpyuVo;F}D`;={@=ao{E7Skql77t5Je1SI8-vhfHiro%1epQ_p z=_T5tYW*_3LjO?eRr)7X;}vnbzm;Css*&E%(QndQTD?u%w0ei$)oMHK&}t{Wr`0an z4P~dfhxS6*hj$;nkCihEJ?00()ZLmMGRs8(S{xK)>@lcrs zQIn$`MuPoGXY@eL>>n0E_*DW3fssTtV*kv!bflLWN%}t{mKsUseOE?N0=Hag$sdda z4jt7Sz3fp*4pbq5D@R$f9b5r^4Q>E$1^0vRfNkKLU~;h~8$n;O<=$!}2w}d1_rB!x zVy}D^{yO;EZQr@Q!+#lmEBqI2-|+^%b5^PNf5FcmZMk=6}^ic9%#!>@<`fm&x< zhyNk`Ciwe*iFX96_l|@FH00v&*;wy$19)_$>Fcb{58QROTbD_j%<7 z_-*jd+rFHI$~>d|C*k|XS?apRb>l3#3fwl%UcD8))#yc+Sn^>oAFKyw zfOmuSC3e(H=&eMr349cEmRd3vOa~*uGB5(H1H-_EQr!Arh~1@0oeh_rg{Tq2HHa%q zy%L9zQG>8*ByFgVB>LnFHp7 zh2RXZ0IZ*6xrf>7n58%sC)hv9D`&!Qf_E%zQf&bSTp zH>tR*;8((**5RL3elz?HlY0m2Xxt%Rc>?lmn{3Gnj3rmtS^Fw1S%uz>;B;_Zh2D6bu3E0E@XFEfTj7sV{!_T}M&%ENpFhQN5AX0#DZd(i{S-?+2)+c)2AihXS94Ca zq~A#7ba1}WOYsK7;<~98_1^sC)Yn~0=iE4d&YXcFtgvS8+!}vjjelX)EPwR^;keZA1EZZMR^PPH zUc1`AFjItmx#hkSPd|5j`Nm@_((X96;S~f9_}{<*{}pJ*@io(PH$O3bR@lD*tbYWF delta 3245 zcmZ{l3tX1f9mmh_IqwC1Q6P~QLlV?SQBXh>L_|?B@DexWCZcSmqBX@!<=j-t)?Bkv z&nmZS(kyeX66c(@wuzSa8){z4Ow7Ec24)&&O26mf!1#P-@cF#o@A;kobDneK<;E2( zIgh1Df$8gn{Zllvk^Ee>K67#x*KsL!iQQ^`w@uiiojNbNJj zU1uPGcAQqI>KN$jS|G(2;;izG&R}&>bd3B`oKr7EX9S)X!olAQ!X+*WA8|>v7GJ5l z=nl@y4R^&A)i&l8Tve-Mitx3y0@SLI*c{ZU>9Lvq*I54z>#sw6%T2ka_Qx)8h#TUj z%Is5Oi0{<;J|i8XUN}`iT%Z~e7tr2c+-kVn^lR@X6O|a3;1J)7+iFf+p&@=y2jhnN ziaTPN5XNj4g{g`T9aV+Hty21SGsIn0+SgigRo^^AG^pTy10+|fa{En$p*Hp#1*s69 z>~=KVg%d6{JU$`7ZM{;s;G@|}Js%%09caB_M|@|at%sfbk!2FTXrpfSFP3fLr}7dD z;jbzagJl5jQ+pG$xSiE~y$%GTy-FAm#RGq2z&z^pa{A*cn~zyHwN0?Gr3u zq8qxag~?uL1bS%eiAZfx=!M>D;vlax8Zoq5*2SWawm9_F)(`R8640M!J&}k3+LAC( zTQUY|8;lffLoig^Fr;c5jt8}+Azj-DjI=F8w;w`=woGJc%SI0E;Gm|OT;%DVd=zLa z#5kI@k|Kc1VF`YQpL62`?;dY%xj^IL3GUUyc;qMhCSmeV_Dw-4 zrm8J`&on%$?J@j9+jPv(R)(3{W?^=th0np`m}<`lrVyM~i}^f(C+(^bT{{oI!msUG zF_4pwXjwZS3$Rf64fQ(9@szfwu}Ir9_>Hz_@mp<+@jGqL;rH5>;Cb7ETp|ZA= z)wT@FX|;Tb!XNOG@(hb~zKmCB){9r*kF?sMe0VheM4ip5)~ZA zx|46c!+x%ln-zWl2T|R)&TSlSTk~0Rv_m+IYIT}p z9KpvlzqDTRC^NWX*1Hi;V1A((+E`@VSbAd#ASSHKj&5dO$&6M#AkM^rwga> zIn|vW={$`ZT0(kc_!)fBG|>M|O!qo3;Vaf(=J=O! zg^Lau5$U{&uW8l|sYRW(Yxss=K`TcDxo{od+8XS@4T@EF6W^iUwp;jK+im=y?GEm0 zYcPamBfU--hBj$9v^fozHn-uUt(DQ*w)>mP+Zb&dyB7Kx{-|#}k#g?m|GpW597cfk zWoz8W*!tG+5&AoWJ?-qCzv;wqeJDp%uASm zVCAme&G}m9mCWC^atAMgvD~g-X9O(IFg^dVhxv&A;oNq-iRD?$x7)+)XwG*quVB8b zsov4buK$pE9rHa_4#`)P+4*D4Q!-6Cg)Ak@$fe{HkBjf^4Bk_F^B zvYb3Yt|5<+)#P-to~$LqvaMZA&o<=>w#u?i&+FDKj0@bDqbe&qR9MP8^p!`wgL^t@qD=@_T4~$3ac1*UTv9Owp|X&91@j{NwfrOD@Kzqpysp67$>2ikGo{d!r&$jk2mEQw)&H~WXX8blW31s z$TdE$QpShMWagF3lkEI0zI&aWM{(-6CE~8o>1jhM(CIb7QbJal0Sx3s!4xBq1Yz-wfd-;%(##CA7-moQ6yDC5KbcX)nQ_kKIz|~| zMqXxyxeW6dlK=k$s%39rU|_KT>Hfq4B9(wxABYWs_zn=?1>z5r1;r&8nI@kR4V}D% zSA24-SQJ|nGsAp_1)JMNBN&Z<1}B8I}MIjAmqB%CKzmQ?Xd)KULfwtz6Qu%%die8AHcYNvZF+d%!dE}{{Lgx2oz@mVnzla zhk=2OL5(4vVZ-E|66%Z_CO-s|oRT26A()H=lZ}$9jGHDemt3pC>Qs{Fp3lIVQ&yOh z&%lvqXc?cETb0DX4ixuI%uZ!sd)l$>$=*4W8>AYAxqyOhnZ+4SiRlb%FE{Ra*0p4^ zxU?@n8(47xQ0<%zPiODjTq-TglEelw($JVe$Rj^DHMk_PB(u0AGr2e*F+G)m3&CfA ls54>UftnnUn3tLZ6*Xnx1UUj($c%x*H?aULGI^qWJpe)#nM42p delta 276 zcmeD5n&2?OQbMAI0SqL|z!W2p1YzNgfd-;%QOpdp7-nzYE*`(CKcpV8COnrlUu99=2VjB zn^?fWnp0Molh44BXJ{Fpms^#@zy*>>EiO(>Pi0_xwyon? t.Language == language); + if (findLan < 0) + { + language = SystemLanguage.English; + } + UseLanguage(language); } - + public void UseLanguage(SystemLanguage language) { _currentLanguage = language; diff --git a/Assets/Scripts/NBC/UI/Runtime/Component/IUIPanel.cs b/Assets/Scripts/NBC/UI/Runtime/Component/IUIPanel.cs index b20cbad8d..4baadeba6 100644 --- a/Assets/Scripts/NBC/UI/Runtime/Component/IUIPanel.cs +++ b/Assets/Scripts/NBC/UI/Runtime/Component/IUIPanel.cs @@ -17,6 +17,11 @@ namespace NBC bool IsCanVisible { get; } bool IsDotDel { get; } + /// + /// 不能返回 + /// + bool IsDontBack { get; } + bool IsModal { get; } bool IsShowCursor { get; } @@ -25,7 +30,7 @@ namespace NBC void SetData(object args); object GetData(); string[] GetDependPackages(); - System.Collections.Generic.Dictionary GetLanguageConfig(); + void Init(); void Show(); void Hide(); diff --git a/Assets/Scripts/NBC/UI/Runtime/Component/UIPanel.cs b/Assets/Scripts/NBC/UI/Runtime/Component/UIPanel.cs index 5dadbf4b7..d4f2f3b44 100644 --- a/Assets/Scripts/NBC/UI/Runtime/Component/UIPanel.cs +++ b/Assets/Scripts/NBC/UI/Runtime/Component/UIPanel.cs @@ -24,7 +24,7 @@ namespace NBC public virtual bool IsCanVisible => ContentPane != null && ContentPane.parent != null && ContentPane.visible; public bool IsDotDel { get; protected set; } - + public bool IsDontBack { get; protected set; } public virtual string UIPackRootUrl => string.Empty; public virtual string UIPackName { get; set; } @@ -76,10 +76,6 @@ namespace NBC return new string[] { }; } - public virtual Dictionary GetLanguageConfig() - { - return new Dictionary(); - } public void Init() { @@ -194,6 +190,15 @@ namespace NBC Show(); } + /// + /// 设置刷新多语言 + /// + public void SetLanguage() + { + _ui.TrySetPanelLanguage(ContentPane); + OnSetLanguage(); + } + public void HideImmediately() { // ContentPane.visible = false; @@ -227,6 +232,7 @@ namespace NBC private void OpenAnimBegin() { OnShow(); + SetLanguage(); _ui?.DispatchEventWith(UIEvents.UIShow, this); } @@ -257,6 +263,13 @@ namespace NBC { } + /// + /// 代码设置多语言,OnShow后和语言变化时会调用 + /// + protected virtual void OnSetLanguage() + { + } + /// /// 显示界面显示 /// @@ -264,13 +277,12 @@ namespace NBC protected virtual void OnShow() { } - + /// /// 显示界面完成(动画后) /// protected virtual void OnShowed() { - } protected virtual void OnUpdate() diff --git a/Assets/Scripts/NBC/UI/Runtime/UILanguage/UIComponentLanguagePack.cs b/Assets/Scripts/NBC/UI/Runtime/UILanguage/UIComponentLanguagePack.cs index ed6fd685b..30b385f8c 100644 --- a/Assets/Scripts/NBC/UI/Runtime/UILanguage/UIComponentLanguagePack.cs +++ b/Assets/Scripts/NBC/UI/Runtime/UILanguage/UIComponentLanguagePack.cs @@ -131,12 +131,12 @@ namespace NBC curField = gtextField; } - if (curField != null) - { - // var textFormat = curField.textFormat; - // textFormat.font = Lan.GetLanFontByCurFont(textFormat.font); - // curField.textFormat = textFormat; - } + if (curField == null) return; + var textFormat = curField.textFormat; + var font = Lan.GetLanFontByCurFont(textFormat.font); + if (font == null) return; + textFormat.font = font; + curField.textFormat = textFormat; } } } \ No newline at end of file diff --git a/Assets/Scripts/Old.meta b/Assets/Scripts/Old.meta deleted file mode 100644 index 433b36db9..000000000 --- a/Assets/Scripts/Old.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 6f1a2150bd924a06ab285e5e5b2f7878 -timeCreated: 1742647242 \ No newline at end of file diff --git a/Assets/Scripts/Old/InputManager.cs b/Assets/Scripts/Old/InputManager.cs deleted file mode 100644 index a2fd418b2..000000000 --- a/Assets/Scripts/Old/InputManager.cs +++ /dev/null @@ -1,651 +0,0 @@ -// using System.Collections.Generic; -// using System.Runtime.InteropServices; -// // using Rewired; -// using UnityEngine; -// using UnityEngine.SceneManagement; -// -// public class InputManager : MonoBehaviour -// { -// public struct POINT -// { -// public int X; -// -// public int Y; -// } -// -// -// // [Tooltip("Rewired Input Manager's player used for handling player's input")] -// // private Player player; -// -// public bool IgnoreAllInput = false; -// -// -// public static bool IsMouseLeft; -// public static bool IsMouseRight; -// -// -// private bool isPaused; -// -// private float MouseX = Screen.width / 2; -// -// private float MouseY = Screen.height / 2; -// -// private float deltaMouseX; -// -// private float deltaMouseY; -// -// private float slowDownReeling; -// -// private float slowDownFloat; -// -// private bool reelUpClicked; -// -// private bool reelDownClicked; -// -// -// public static Vector2 movementAxis; -// -// public static bool isJumping; -// -// public static bool isCameraChange; -// -// public static bool isUnderwaterCamera; -// -// public static bool isUnderwaterCameraZoomUp; -// -// public static bool isUnderwaterCameraZoomDown; -// -// public static bool isUnderwaterCameraFloatZoom; -// -// public static bool LT; -// -// public static bool showUI = true; -// -// -// public static bool underwaterCameraMini; -// -// public static bool isHeadFlashLight; -// -// public static bool quickHelp; -// -// public static bool isEagleEye; -// -// public static bool isRunning; -// -// public static bool isReelReeling; -// -// public static bool isReelSpeedUp; -// -// public static bool isReelSpeedDown; -// -// public static bool isReelSpeedMax; -// -// public static bool isReelDragUp; -// -// public static bool isReelDragDown; -// -// public static bool isCastNear; -// -// public static bool isCastFar; -// -// public static bool isPullUpRod; -// -// -// public static bool isCastReset; -// -// public static bool isDeepthFloatUp; -// -// public static bool isDeepthFloatDown; -// -// -// public static bool isShowSlot0; -// -// public static bool isShowSlot1; -// -// public static bool isShowSlot2; -// -// public static bool isShowSlot3; -// -// public static bool isShowSlot4; -// -// -// public static bool RB; -// -// [DllImport("user32.dll")] -// private static extern bool SetCursorPos(int X, int Y); -// -// [DllImport("user32.dll")] -// private static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo); -// -// [DllImport("user32.dll")] -// public static extern bool GetCursorPos(out POINT lpPoint); -// -// private void Start() -// { -// player = ReInput.players.GetPlayer(0); -// MouseMap mouseMapInstance = ReInput.mapping.GetMouseMapInstance(0, 0); -// MouseMap mouseMapInstanceSavedOrDefault = ReInput.mapping.GetMouseMapInstanceSavedOrDefault(0, 0, 0); -// KeyboardMap keyboardMapInstance = ReInput.mapping.GetKeyboardMapInstance(0, 0); -// KeyboardMap keyboardMapInstanceSavedOrDefault = ReInput.mapping.GetKeyboardMapInstanceSavedOrDefault(0, 0, 0); -// int num = mouseMapInstance.ButtonMaps.Count - mouseMapInstanceSavedOrDefault.ButtonMaps.Count; -// for (int i = 0; i < num; i++) -// { -// Debug.Log("Added new map: " + mouseMapInstance.ButtonMaps[mouseMapInstance.ButtonMaps.Count - 1 - i] -// .actionDescriptiveName); -// mouseMapInstanceSavedOrDefault.ButtonMaps.Add( -// mouseMapInstance.ButtonMaps[mouseMapInstance.ButtonMaps.Count - 1 - i]); -// } -// -// num = keyboardMapInstance.ButtonMaps.Count - keyboardMapInstanceSavedOrDefault.ButtonMaps.Count; -// for (int j = 0; j < num; j++) -// { -// Debug.Log("Added new map: " + keyboardMapInstance.ButtonMaps[keyboardMapInstance.ButtonMaps.Count - 1 - j] -// .actionDescriptiveName); -// keyboardMapInstanceSavedOrDefault.ButtonMaps.Add( -// keyboardMapInstance.ButtonMaps[keyboardMapInstance.ButtonMaps.Count - 1 - j]); -// } -// -// num = mouseMapInstance.AxisMaps.Count - mouseMapInstanceSavedOrDefault.AxisMaps.Count; -// for (int k = 0; k < num; k++) -// { -// Debug.Log(mouseMapInstance.AxisMaps[mouseMapInstance.AxisMaps.Count - 1 - k].actionDescriptiveName); -// mouseMapInstanceSavedOrDefault.AxisMaps.Add( -// mouseMapInstance.ButtonMaps[mouseMapInstance.ButtonMaps.Count - 1 - k]); -// } -// -// ReInput.userDataStore?.Save(); -// ReInput.userDataStore?.SavePlayerData(0); -// ReInput.userDataStore?.Load(); -// } -// -// private void recheckMouseDeltaPosition() -// { -// GetCursorPos(out var lpPoint); -// deltaMouseX = Mathf.Abs((float)lpPoint.X - Input.mousePosition.x); -// deltaMouseY = Mathf.Abs((float)lpPoint.Y + (Input.mousePosition.y - (float)Screen.height)); -// } -// -// public void SetCursorPositionToScreenCenter() -// { -// recheckMouseDeltaPosition(); -// MouseX = Screen.width / 2; -// MouseY = Screen.height / 2; -// SetCursorPos((int)(deltaMouseX + (float)(Screen.width / 2)), (int)(deltaMouseY + (float)(Screen.height / 2))); -// } -// -// private void Update() -// { -// if (IgnoreAllInput) -// { -// return; -// } -// -// if (Input.GetMouseButtonDown(0)) -// { -// IsMouseLeft = true; -// } -// -// if (Input.GetMouseButtonUp(0)) -// { -// IsMouseLeft = false; -// } -// -// if (Input.GetMouseButtonDown(1)) -// { -// IsMouseRight = true; -// } -// -// if (Input.GetMouseButtonUp(1)) -// { -// IsMouseRight = false; -// } -// -// // if (player.GetButtonDown("PressRMB")) -// // { -// // Debug.Log("PRESSEDDDDD"); -// // } -// -// -// if (player.GetButtonDown("rodPullUpButton") && CanPullUpRod()) -// { -// isPullUpRod = true; -// } -// -// if (player.GetButtonUp("rodPullUpButton")) -// { -// isPullUpRod = false; -// } -// -// if (player.GetButtonDown("LT")) -// { -// LT = true; -// } -// -// if (player.GetButtonUp("LT")) -// { -// LT = false; -// } -// -// if (player.GetButtonDown("RB")) -// { -// RB = true; -// } -// -// if (player.GetButtonUp("RB")) -// { -// RB = false; -// } -// -// if (player.GetButtonDown("reelSpeedMax")) -// { -// isReelSpeedMax = true; -// // isreelSpeedMaxHold = true; -// } -// else if (player.GetButtonUp("reelSpeedMax")) -// { -// isReelSpeedMax = false; -// // isreelSpeedMaxHold = false; -// } -// else if (RB) -// { -// if (reelUpClicked) -// { -// isReelSpeedMax = true; -// } -// else -// { -// isReelSpeedMax = false; -// } -// } -// -// // if (!isreelSpeedMaxHold) -// // { -// // isReelSpeedMax = false; -// // } -// -// if (player.GetButtonDown("quickHelpKey")) -// { -// quickHelp = !quickHelp; -// } -// -// -// movementAxis = Vector2.zero; -// // if (!SRDebug.Instance.IsDebugPanelVisible) -// { -// if (Application.isFocused) -// { -// movementAxis.x = player.GetAxis("moveHorizontal") * Time.deltaTime * 500f; -// movementAxis.y = player.GetAxis("moveVertical") * Time.deltaTime * 500f; -// } -// } -// -// -// if (player.GetButtonDown("reelSpeedUp")) -// { -// reelUpClicked = true; -// } -// -// if (player.GetButtonUp("reelSpeedUp")) -// { -// isReelSpeedUp = false; -// reelUpClicked = false; -// } -// -// if (player.GetButtonDown("reelSpeedDown")) -// { -// reelDownClicked = true; -// } -// -// if (player.GetButtonUp("reelSpeedDown")) -// { -// isReelSpeedDown = false; -// reelDownClicked = false; -// } -// -// // if (FScriptsHandler.Instance != null && FScriptsHandler.Instance.m_PlayerMain.currentRod != null && -// // (!LT || FScriptsHandler.Instance.m_PlayerMain.currentRod.rodType != 0) && !RB) -// // { -// // if (reelUpClicked) -// // { -// // if (slowDownReeling >= 1f) -// // { -// // isReelSpeedUp = true; -// // slowDownReeling = 0f; -// // } -// // else -// // { -// // isReelSpeedUp = false; -// // slowDownReeling += Time.deltaTime * 100f; -// // } -// // } -// // -// // if (reelDownClicked) -// // { -// // if (slowDownReeling >= 1f) -// // { -// // isReelSpeedDown = true; -// // slowDownReeling = 0f; -// // } -// // else -// // { -// // isReelSpeedDown = false; -// // slowDownReeling += Time.deltaTime * 100f; -// // } -// // } -// // } -// -// -// if (player.GetButtonDown("jumping")) -// { -// isJumping = true; -// } -// else -// { -// isJumping = false; -// } -// -// -// -// if (player.GetButtonDown("runKey")) -// { -// isRunning = true; -// } -// -// if (player.GetButtonUp("runKey")) -// { -// isRunning = false; -// } -// -// if (player.GetButtonDown("cameraTypeViewKey")) -// { -// isCameraChange = !isCameraChange; -// } -// -// if (player.GetButtonDown("showGUIKey")) -// { -// showUI = !showUI; -// } -// -// -// if (player.GetButtonDown("eagleEye")) -// { -// isEagleEye = true; -// } -// -// if (player.GetButtonUp("eagleEye")) -// { -// isEagleEye = false; -// } -// -// if (player.GetButtonDown("underwaterCameraKey")) -// { -// isUnderwaterCamera = !isUnderwaterCamera; -// } -// -// if (player.GetButtonDown("underwaterMiniCameraKey")) -// { -// underwaterCameraMini = !underwaterCameraMini; -// } -// -// if (player.GetButtonDown("underwaterZoomUpCameraKey")) -// { -// isUnderwaterCameraZoomUp = true; -// } -// -// if (player.GetButtonUp("underwaterZoomUpCameraKey")) -// { -// isUnderwaterCameraZoomUp = false; -// } -// -// if (player.GetButtonDown("underwaterZoomDownCameraKey")) -// { -// isUnderwaterCameraZoomDown = true; -// } -// -// if (player.GetButtonUp("underwaterZoomDownCameraKey")) -// { -// isUnderwaterCameraZoomDown = false; -// } -// -// if (player.GetButtonDown("underwaterZoomFloat")) -// { -// isUnderwaterCameraFloatZoom = true; -// } -// else -// { -// isUnderwaterCameraFloatZoom = false; -// } -// -// if (player.GetButtonDown("showSlot0")) -// { -// isShowSlot0 = true; -// Debug.LogError("showSlot0======"); -// } -// else -// { -// isShowSlot0 = false; -// } -// -// if (player.GetButtonDown("showSlot1")) -// { -// isShowSlot1 = true; -// Debug.LogError("showSlot1======"); -// } -// else -// { -// isShowSlot1 = false; -// } -// -// if (player.GetButtonDown("showSlot2")) -// { -// isShowSlot2 = true; -// Debug.LogError("showSlot2======"); -// } -// else -// { -// isShowSlot2 = false; -// } -// -// if (player.GetButtonDown("showSlot3")) -// { -// isShowSlot3 = true; -// } -// else -// { -// isShowSlot3 = false; -// } -// -// if (player.GetButtonDown("showSlot4")) -// { -// isShowSlot4 = true; -// } -// else -// { -// isShowSlot4 = false; -// } -// -// -// // if (!isCastFar) -// // { -// // if (GameManager.Instance.currentLevelPopUp != null) -// // { -// // return; -// // } -// // -// // if (player.GetButtonDown("NearCastButton")) -// // { -// // isCastNear = true; -// // } -// // else if (player.GetButtonUp("NearCastButton") && isCastNear) -// // { -// // isCastNear = false; -// // } -// // } -// // -// // if (!isCastNear) -// // { -// // if (GameManager.Instance.currentLevelPopUp != null) -// // { -// // return; -// // } -// // -// // if (player.GetButtonDown("FarCastButton")) -// // { -// // isCastFar = true; -// // } -// // else if (player.GetButtonUp("FarCastButton") && isCastFar) -// // { -// // isCastFar = false; -// // } -// // } -// // -// -// if (player.GetButtonTimePressed("resetCast") >= 1.0) -// { -// isCastReset = true; -// } -// else -// { -// isCastReset = false; -// } -// -// -// if (player.GetButtonDown("reelDragUp")) -// { -// isReelDragUp = true; -// } -// else -// { -// isReelDragUp = false; -// } -// -// if (player.GetButtonDown("reelDragDown")) -// { -// isReelDragDown = true; -// } -// else -// { -// isReelDragDown = false; -// } -// -// -// if (player.GetButtonDown("headFlashLight")) -// { -// isHeadFlashLight = !isHeadFlashLight; -// } -// -// -// if (player.GetButtonDown("floatDeepthUp")) -// { -// isDeepthFloatUp = true; -// } -// else -// { -// isDeepthFloatUp = false; -// } -// -// if (player.GetButtonDown("floatDeepthDown")) -// { -// isDeepthFloatDown = true; -// } -// else -// { -// isDeepthFloatDown = false; -// } -// -// if (player.GetButtonDown("Reeling")) -// { -// isReelReeling = true; -// } -// -// if (player.GetButtonUp("Reeling")) -// { -// isReelReeling = false; -// } -// -// if (LT && !RB) -// { -// if (reelUpClicked) -// { -// if (slowDownFloat >= 1f) -// { -// isDeepthFloatUp = true; -// slowDownFloat = 0f; -// } -// else -// { -// isDeepthFloatUp = false; -// slowDownFloat += Time.deltaTime * 10f; -// } -// } -// -// if (reelDownClicked) -// { -// if (slowDownFloat >= 1f) -// { -// isDeepthFloatDown = true; -// slowDownFloat = 0f; -// } -// else -// { -// isDeepthFloatDown = false; -// slowDownFloat += Time.deltaTime * 10f; -// } -// } -// } -// -// } -// -// private bool CanPullUpRod() -// { -// // if (FScriptsHandler.Instance == null) -// // { -// // return false; -// // } -// // -// // if (FScriptsHandler.Instance.m_PlayerMain == null) -// // { -// // return false; -// // } -// // -// // if (FScriptsHandler.Instance.m_PlayerMain.currentRod == null) -// // { -// // return false; -// // } -// // -// // if (FScriptsHandler.Instance.m_PlayerMain.currentRod.fishingLine == null) -// // { -// // return false; -// // } -// // -// // if (FScriptsHandler.Instance.m_PlayerMain.currentRod.fishingLine.ropeToHookDistance <= 1f) -// // { -// // if (FScriptsHandler.Instance.m_PlayerMain.currentRod.currentFish != null || -// // FScriptsHandler.Instance.m_PlayerMain.currentRod.takeFish != null) -// // { -// // return true; -// // } -// // -// // return false; -// // } -// -// return true; -// } -// -// public static void ResetMouseButtonsTriggers() -// { -// isCastNear = false; -// isCastFar = false; -// isReelReeling = false; -// } -// -// private void OnApplicationFocus(bool hasFocus) -// { -// isPaused = !hasFocus; -// } -// -// private void OnApplicationPause(bool pauseStatus) -// { -// isPaused = pauseStatus; -// } -// } \ No newline at end of file diff --git a/Assets/Scripts/Old/InputManager.cs.meta b/Assets/Scripts/Old/InputManager.cs.meta deleted file mode 100644 index 62c5faf50..000000000 --- a/Assets/Scripts/Old/InputManager.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 06ccb0a1e4364d43bf431b652400cd31 -timeCreated: 1742311542 \ No newline at end of file diff --git a/Assets/Scripts/Startup/App.cs b/Assets/Scripts/Startup/App.cs index f87997816..96dd95d46 100644 --- a/Assets/Scripts/Startup/App.cs +++ b/Assets/Scripts/Startup/App.cs @@ -61,9 +61,27 @@ namespace NBF private void Init() { InitService(); + InitLanguage(); InitUI(); } + #region 多语言 + + private void InitLanguage() + { + Lan.Inst.AddLanguageModule((int)LanguageModuleType.Text, new LanguageText()); + Lan.Inst.AddLanguageModule((int)LanguageModuleType.Image, new LanguageImage()); + Lan.Inst.AddLanguageModule((int)LanguageModuleType.Font, new LanguageFont()); + + foreach (var key in LanguageConst.languageMap.Keys) + { + Lan.Inst.AddLanguage(key); + } + + UI.Inst.SetUILanguage(); + } + + #endregion #region UI @@ -118,6 +136,7 @@ namespace NBF InputDef.LoadIcon(); // UI.Inst.OpenUI(); LoadData(); + UI.Inst.OpenUI(); // Fishing.Inst.Go(1); // UI.Inst.OpenUI(); UI.Inst.OpenUI(); diff --git a/Assets/Scripts/UI/Bag/BagPanel.cs b/Assets/Scripts/UI/Bag/BagPanel.cs index e6122b5fa..a2ba2722b 100644 --- a/Assets/Scripts/UI/Bag/BagPanel.cs +++ b/Assets/Scripts/UI/Bag/BagPanel.cs @@ -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; } diff --git a/Assets/Scripts/UI/Binders/CommonBinder.cs b/Assets/Scripts/UI/Binders/CommonBinder.cs index cdc01e2e1..d03266723 100644 --- a/Assets/Scripts/UI/Binders/CommonBinder.cs +++ b/Assets/Scripts/UI/Binders/CommonBinder.cs @@ -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)); diff --git a/Assets/Scripts/UI/Binders/MainBinder.cs b/Assets/Scripts/UI/Binders/MainBinder.cs index a1145c6ce..ba43589cf 100644 --- a/Assets/Scripts/UI/Binders/MainBinder.cs +++ b/Assets/Scripts/UI/Binders/MainBinder.cs @@ -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)); } } diff --git a/Assets/Scripts/UI/BtnTextInputControl.Designer.cs b/Assets/Scripts/UI/Common/BtnTextInputControl.Designer.cs similarity index 100% rename from Assets/Scripts/UI/BtnTextInputControl.Designer.cs rename to Assets/Scripts/UI/Common/BtnTextInputControl.Designer.cs diff --git a/Assets/Scripts/UI/BtnTextInputControl.Designer.cs.meta b/Assets/Scripts/UI/Common/BtnTextInputControl.Designer.cs.meta similarity index 100% rename from Assets/Scripts/UI/BtnTextInputControl.Designer.cs.meta rename to Assets/Scripts/UI/Common/BtnTextInputControl.Designer.cs.meta diff --git a/Assets/Scripts/UI/BtnTextInputControl.cs b/Assets/Scripts/UI/Common/BtnTextInputControl.cs similarity index 100% rename from Assets/Scripts/UI/BtnTextInputControl.cs rename to Assets/Scripts/UI/Common/BtnTextInputControl.cs diff --git a/Assets/Scripts/UI/BtnTextInputControl.cs.meta b/Assets/Scripts/UI/Common/BtnTextInputControl.cs.meta similarity index 100% rename from Assets/Scripts/UI/BtnTextInputControl.cs.meta rename to Assets/Scripts/UI/Common/BtnTextInputControl.cs.meta diff --git a/Assets/Scripts/UI/Common/MarqueeTag.Designer.cs b/Assets/Scripts/UI/Common/MarqueeTag.Designer.cs new file mode 100644 index 000000000..a3d6f648a --- /dev/null +++ b/Assets/Scripts/UI/Common/MarqueeTag.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 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); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Common/MarqueeTag.Designer.cs.meta b/Assets/Scripts/UI/Common/MarqueeTag.Designer.cs.meta new file mode 100644 index 000000000..1ef7f25e6 --- /dev/null +++ b/Assets/Scripts/UI/Common/MarqueeTag.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6a9cfe2c247599a4aacfea389e45ce14 \ No newline at end of file diff --git a/Assets/Scripts/UI/Common/MarqueeTag.cs b/Assets/Scripts/UI/Common/MarqueeTag.cs new file mode 100644 index 000000000..1cb73cb7d --- /dev/null +++ b/Assets/Scripts/UI/Common/MarqueeTag.cs @@ -0,0 +1,15 @@ +// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖 + +using UnityEngine; +using FairyGUI; +using NBC; + +namespace NBF +{ + public partial class MarqueeTag : GComponent + { + private void OnInited() + { + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Common/MarqueeTag.cs.meta b/Assets/Scripts/UI/Common/MarqueeTag.cs.meta new file mode 100644 index 000000000..cde6fc784 --- /dev/null +++ b/Assets/Scripts/UI/Common/MarqueeTag.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 70a1e1d821a7bc24e8eac7cc9bbf074b \ No newline at end of file diff --git a/Assets/Scripts/UI/Common/Menu/BottomMenu.cs b/Assets/Scripts/UI/Common/Menu/BottomMenu.cs index 68ed60fb4..ffcfc030a 100644 --- a/Assets/Scripts/UI/Common/Menu/BottomMenu.cs +++ b/Assets/Scripts/UI/Common/Menu/BottomMenu.cs @@ -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) { diff --git a/Assets/Scripts/UI/Common/Panel.meta b/Assets/Scripts/UI/Common/Panel.meta new file mode 100644 index 000000000..fdcfe4816 --- /dev/null +++ b/Assets/Scripts/UI/Common/Panel.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 059888fe216d4a789f01c3289be01645 +timeCreated: 1748933992 \ No newline at end of file diff --git a/Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs b/Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs new file mode 100644 index 000000000..cb46b9880 --- /dev/null +++ b/Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs @@ -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 +{ + /// + 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[] {}; } + + + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs.meta b/Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs.meta new file mode 100644 index 000000000..cdd853772 --- /dev/null +++ b/Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: bbb8f680eb100a84c957fad39fae2e96 \ No newline at end of file diff --git a/Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs b/Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs new file mode 100644 index 000000000..8e05064bd --- /dev/null +++ b/Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs @@ -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(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs.meta b/Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs.meta new file mode 100644 index 000000000..c10d4169a --- /dev/null +++ b/Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: b07b25d31dce1224e913094a95196cbb \ No newline at end of file diff --git a/Assets/Scripts/UI/Common/GMPanel.Designer.cs b/Assets/Scripts/UI/Common/Panel/GMPanel.Designer.cs similarity index 100% rename from Assets/Scripts/UI/Common/GMPanel.Designer.cs rename to Assets/Scripts/UI/Common/Panel/GMPanel.Designer.cs diff --git a/Assets/Scripts/UI/Common/GMPanel.Designer.cs.meta b/Assets/Scripts/UI/Common/Panel/GMPanel.Designer.cs.meta similarity index 100% rename from Assets/Scripts/UI/Common/GMPanel.Designer.cs.meta rename to Assets/Scripts/UI/Common/Panel/GMPanel.Designer.cs.meta diff --git a/Assets/Scripts/UI/Common/GMPanel.cs b/Assets/Scripts/UI/Common/Panel/GMPanel.cs similarity index 100% rename from Assets/Scripts/UI/Common/GMPanel.cs rename to Assets/Scripts/UI/Common/Panel/GMPanel.cs diff --git a/Assets/Scripts/UI/Common/GMPanel.cs.meta b/Assets/Scripts/UI/Common/Panel/GMPanel.cs.meta similarity index 100% rename from Assets/Scripts/UI/Common/GMPanel.cs.meta rename to Assets/Scripts/UI/Common/Panel/GMPanel.cs.meta diff --git a/Assets/Scripts/UI/Common/MessageBox.Designer.cs b/Assets/Scripts/UI/Common/Panel/MessageBox.Designer.cs similarity index 100% rename from Assets/Scripts/UI/Common/MessageBox.Designer.cs rename to Assets/Scripts/UI/Common/Panel/MessageBox.Designer.cs diff --git a/Assets/Scripts/UI/Common/MessageBox.Designer.cs.meta b/Assets/Scripts/UI/Common/Panel/MessageBox.Designer.cs.meta similarity index 100% rename from Assets/Scripts/UI/Common/MessageBox.Designer.cs.meta rename to Assets/Scripts/UI/Common/Panel/MessageBox.Designer.cs.meta diff --git a/Assets/Scripts/UI/Common/MessageBox.cs b/Assets/Scripts/UI/Common/Panel/MessageBox.cs similarity index 98% rename from Assets/Scripts/UI/Common/MessageBox.cs rename to Assets/Scripts/UI/Common/Panel/MessageBox.cs index 047bfd71c..4c3847dc5 100644 --- a/Assets/Scripts/UI/Common/MessageBox.cs +++ b/Assets/Scripts/UI/Common/Panel/MessageBox.cs @@ -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; diff --git a/Assets/Scripts/UI/Common/MessageBox.cs.meta b/Assets/Scripts/UI/Common/Panel/MessageBox.cs.meta similarity index 100% rename from Assets/Scripts/UI/Common/MessageBox.cs.meta rename to Assets/Scripts/UI/Common/Panel/MessageBox.cs.meta diff --git a/Assets/Scripts/UI/Common/Notices.Designer.cs b/Assets/Scripts/UI/Common/Panel/Notices.Designer.cs similarity index 100% rename from Assets/Scripts/UI/Common/Notices.Designer.cs rename to Assets/Scripts/UI/Common/Panel/Notices.Designer.cs diff --git a/Assets/Scripts/UI/Common/Notices.Designer.cs.meta b/Assets/Scripts/UI/Common/Panel/Notices.Designer.cs.meta similarity index 100% rename from Assets/Scripts/UI/Common/Notices.Designer.cs.meta rename to Assets/Scripts/UI/Common/Panel/Notices.Designer.cs.meta diff --git a/Assets/Scripts/UI/Common/Notices.cs b/Assets/Scripts/UI/Common/Panel/Notices.cs similarity index 100% rename from Assets/Scripts/UI/Common/Notices.cs rename to Assets/Scripts/UI/Common/Panel/Notices.cs diff --git a/Assets/Scripts/UI/Common/Notices.cs.meta b/Assets/Scripts/UI/Common/Panel/Notices.cs.meta similarity index 100% rename from Assets/Scripts/UI/Common/Notices.cs.meta rename to Assets/Scripts/UI/Common/Panel/Notices.cs.meta diff --git a/Assets/Scripts/UI/UILangeageConfig.cs b/Assets/Scripts/UI/Common/UILangeageConfig.cs similarity index 100% rename from Assets/Scripts/UI/UILangeageConfig.cs rename to Assets/Scripts/UI/Common/UILangeageConfig.cs diff --git a/Assets/Scripts/UI/UILangeageConfig.cs.meta b/Assets/Scripts/UI/Common/UILangeageConfig.cs.meta similarity index 100% rename from Assets/Scripts/UI/UILangeageConfig.cs.meta rename to Assets/Scripts/UI/Common/UILangeageConfig.cs.meta diff --git a/Assets/Scripts/UI/FishBag.meta b/Assets/Scripts/UI/FishBag.meta new file mode 100644 index 000000000..5ce1739d8 --- /dev/null +++ b/Assets/Scripts/UI/FishBag.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4021be5a688e4880815366add9c9e2fd +timeCreated: 1748941707 \ No newline at end of file diff --git a/Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs b/Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs new file mode 100644 index 000000000..ce945609f --- /dev/null +++ b/Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs @@ -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 +{ + /// + 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"}; } + + + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs.meta b/Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs.meta new file mode 100644 index 000000000..a4bd76dfd --- /dev/null +++ b/Assets/Scripts/UI/FishBag/FishBagPanel.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 55a42f040765e1948898ff81902abff4 \ No newline at end of file diff --git a/Assets/Scripts/UI/FishBag/FishBagPanel.cs b/Assets/Scripts/UI/FishBag/FishBagPanel.cs new file mode 100644 index 000000000..a6359295b --- /dev/null +++ b/Assets/Scripts/UI/FishBag/FishBagPanel.cs @@ -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(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/FishBag/FishBagPanel.cs.meta b/Assets/Scripts/UI/FishBag/FishBagPanel.cs.meta new file mode 100644 index 000000000..355e0e57b --- /dev/null +++ b/Assets/Scripts/UI/FishBag/FishBagPanel.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6de4d8117b1b09340b4d11dd47e74b32 \ No newline at end of file diff --git a/Assets/Scripts/UI/Fishing/FishingPanel.cs b/Assets/Scripts/UI/Fishing/FishingPanel.cs index e72d8e4a2..35e202dae 100644 --- a/Assets/Scripts/UI/Fishing/FishingPanel.cs +++ b/Assets/Scripts/UI/Fishing/FishingPanel.cs @@ -14,6 +14,7 @@ namespace NBF protected override void OnInit() { IsShowCursor = false; + IsDontBack = true; } protected override void OnShow() diff --git a/Assets/Scripts/UI/FishingPower.Designer.cs b/Assets/Scripts/UI/Fishing/FishingPower.Designer.cs similarity index 100% rename from Assets/Scripts/UI/FishingPower.Designer.cs rename to Assets/Scripts/UI/Fishing/FishingPower.Designer.cs diff --git a/Assets/Scripts/UI/FishingPower.Designer.cs.meta b/Assets/Scripts/UI/Fishing/FishingPower.Designer.cs.meta similarity index 100% rename from Assets/Scripts/UI/FishingPower.Designer.cs.meta rename to Assets/Scripts/UI/Fishing/FishingPower.Designer.cs.meta diff --git a/Assets/Scripts/UI/FishingPower.cs b/Assets/Scripts/UI/Fishing/FishingPower.cs similarity index 100% rename from Assets/Scripts/UI/FishingPower.cs rename to Assets/Scripts/UI/Fishing/FishingPower.cs diff --git a/Assets/Scripts/UI/FishingPower.cs.meta b/Assets/Scripts/UI/Fishing/FishingPower.cs.meta similarity index 100% rename from Assets/Scripts/UI/FishingPower.cs.meta rename to Assets/Scripts/UI/Fishing/FishingPower.cs.meta diff --git a/Assets/Scripts/UI/FishingStateInfo.Designer.cs b/Assets/Scripts/UI/Fishing/FishingStateInfo.Designer.cs similarity index 100% rename from Assets/Scripts/UI/FishingStateInfo.Designer.cs rename to Assets/Scripts/UI/Fishing/FishingStateInfo.Designer.cs diff --git a/Assets/Scripts/UI/FishingStateInfo.Designer.cs.meta b/Assets/Scripts/UI/Fishing/FishingStateInfo.Designer.cs.meta similarity index 100% rename from Assets/Scripts/UI/FishingStateInfo.Designer.cs.meta rename to Assets/Scripts/UI/Fishing/FishingStateInfo.Designer.cs.meta diff --git a/Assets/Scripts/UI/FishingStateInfo.cs b/Assets/Scripts/UI/Fishing/FishingStateInfo.cs similarity index 100% rename from Assets/Scripts/UI/FishingStateInfo.cs rename to Assets/Scripts/UI/Fishing/FishingStateInfo.cs diff --git a/Assets/Scripts/UI/FishingStateInfo.cs.meta b/Assets/Scripts/UI/Fishing/FishingStateInfo.cs.meta similarity index 100% rename from Assets/Scripts/UI/FishingStateInfo.cs.meta rename to Assets/Scripts/UI/Fishing/FishingStateInfo.cs.meta diff --git a/Assets/Scripts/UI/Home/Com/HomeButtonGroups.Designer.cs b/Assets/Scripts/UI/Home/Com/HomeButtonGroups.Designer.cs index 92f9b2ccd..0173331d3 100644 --- a/Assets/Scripts/UI/Home/Com/HomeButtonGroups.Designer.cs +++ b/Assets/Scripts/UI/Home/Com/HomeButtonGroups.Designer.cs @@ -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"); diff --git a/Assets/Scripts/UI/Home/Com/HomeButtonGroups.cs b/Assets/Scripts/UI/Home/Com/HomeButtonGroups.cs index b398adcb2..3d5bebc0d 100644 --- a/Assets/Scripts/UI/Home/Com/HomeButtonGroups.cs +++ b/Assets/Scripts/UI/Home/Com/HomeButtonGroups.cs @@ -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(); } + else if (btn == BtnFishBag) + { + UI.Inst.OpenUI(); + } + else if (btn == BtnMake) + { + UI.Inst.OpenUI(); + } + else if (btn == BtnMap) + { + UI.Inst.OpenUI(); + } } } } \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/HomePanel.cs b/Assets/Scripts/UI/Home/HomePanel.cs index e62222b8a..bff2548ac 100644 --- a/Assets/Scripts/UI/Home/HomePanel.cs +++ b/Assets/Scripts/UI/Home/HomePanel.cs @@ -56,7 +56,7 @@ namespace NBF var nowPage = GetPage(index); if (nowPage != null) { - nowPage.Show(); + nowPage.Show(this); _currentPage = nowPage; } } diff --git a/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs b/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs index baf7bc131..0acbaebc6 100644 --- a/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs +++ b/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs @@ -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(); + BottomMenu.Use(Panel); } } } \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomePageBase.cs b/Assets/Scripts/UI/Home/Pages/HomePageBase.cs index 058061281..24d45c7c9 100644 --- a/Assets/Scripts/UI/Home/Pages/HomePageBase.cs +++ b/Assets/Scripts/UI/Home/Pages/HomePageBase.cs @@ -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 diff --git a/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs b/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs new file mode 100644 index 000000000..cc44290c8 --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.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 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); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs.meta b/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs.meta new file mode 100644 index 000000000..caf0d31ea --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 06d572bce2eeaf24d8a2d235976dc02c \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs b/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs new file mode 100644 index 000000000..4d4a9243d --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs @@ -0,0 +1,15 @@ +// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖 + +using UnityEngine; +using FairyGUI; +using NBC; + +namespace NBF +{ + public partial class HomeStatisticsPage : GComponent + { + private void OnInited() + { + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs.meta b/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs.meta new file mode 100644 index 000000000..df5f653eb --- /dev/null +++ b/Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 1b12895a3e4e7fb4287cbf7a026d7887 \ No newline at end of file diff --git a/Assets/Scripts/UI/Loading/LoadingPanel.cs b/Assets/Scripts/UI/Loading/LoadingPanel.cs index ec6ad338e..fe7589b9a 100644 --- a/Assets/Scripts/UI/Loading/LoadingPanel.cs +++ b/Assets/Scripts/UI/Loading/LoadingPanel.cs @@ -26,7 +26,7 @@ namespace NBF protected override void OnInit() { - base.OnInit(); + ContentPane.sortingOrder = UIDef.UIOrder.Loading; } protected override void OnShow() diff --git a/Assets/Scripts/UI/Make.meta b/Assets/Scripts/UI/Make.meta new file mode 100644 index 000000000..cea7fadae --- /dev/null +++ b/Assets/Scripts/UI/Make.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 40364b7c47864017827ec33f9d7333b1 +timeCreated: 1748941666 \ No newline at end of file diff --git a/Assets/Scripts/UI/Make/MakePanel.Designer.cs b/Assets/Scripts/UI/Make/MakePanel.Designer.cs new file mode 100644 index 000000000..5812c0370 --- /dev/null +++ b/Assets/Scripts/UI/Make/MakePanel.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 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"}; } + + + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Make/MakePanel.Designer.cs.meta b/Assets/Scripts/UI/Make/MakePanel.Designer.cs.meta new file mode 100644 index 000000000..3dbbb561a --- /dev/null +++ b/Assets/Scripts/UI/Make/MakePanel.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 0325840d66749994ca0ba6436eaef4aa \ No newline at end of file diff --git a/Assets/Scripts/UI/Make/MakePanel.cs b/Assets/Scripts/UI/Make/MakePanel.cs new file mode 100644 index 000000000..71a55ae88 --- /dev/null +++ b/Assets/Scripts/UI/Make/MakePanel.cs @@ -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(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Make/MakePanel.cs.meta b/Assets/Scripts/UI/Make/MakePanel.cs.meta new file mode 100644 index 000000000..fe3d75d48 --- /dev/null +++ b/Assets/Scripts/UI/Make/MakePanel.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 12d3dad5e220cfd47907482e50d15e13 \ No newline at end of file diff --git a/Assets/Scripts/UI/MapPanel.Designer.cs b/Assets/Scripts/UI/MapPanel.Designer.cs new file mode 100644 index 000000000..6bf7f5161 --- /dev/null +++ b/Assets/Scripts/UI/MapPanel.Designer.cs @@ -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 +{ + /// + 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"}; } + + + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/MapPanel.Designer.cs.meta b/Assets/Scripts/UI/MapPanel.Designer.cs.meta new file mode 100644 index 000000000..da9270cb6 --- /dev/null +++ b/Assets/Scripts/UI/MapPanel.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: e4254804b3cc16d44bcafcd96139ab90 \ No newline at end of file diff --git a/Assets/Scripts/UI/MapPanel.cs b/Assets/Scripts/UI/MapPanel.cs new file mode 100644 index 000000000..ee5b4f2dd --- /dev/null +++ b/Assets/Scripts/UI/MapPanel.cs @@ -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(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/MapPanel.cs.meta b/Assets/Scripts/UI/MapPanel.cs.meta new file mode 100644 index 000000000..9bc52cc24 --- /dev/null +++ b/Assets/Scripts/UI/MapPanel.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 69a29998a66d1ec4cb15ebb8e5de9cb6 \ No newline at end of file diff --git a/Assets/Scripts/UI/Settings/SettingPanel.cs b/Assets/Scripts/UI/Settings/SettingPanel.cs index bdcd2a267..b2b81725c 100644 --- a/Assets/Scripts/UI/Settings/SettingPanel.cs +++ b/Assets/Scripts/UI/Settings/SettingPanel.cs @@ -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; } diff --git a/Assets/Scripts/UI/Shops/FishingShopPanel.cs b/Assets/Scripts/UI/Shops/FishingShopPanel.cs index 26337400b..7278845d5 100644 --- a/Assets/Scripts/UI/Shops/FishingShopPanel.cs +++ b/Assets/Scripts/UI/Shops/FishingShopPanel.cs @@ -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(); diff --git a/Assets/Scripts/Utils/Extends/UIInputExtensions.cs b/Assets/Scripts/Utils/Extends/UIInputExtensions.cs new file mode 100644 index 000000000..704bd423a --- /dev/null +++ b/Assets/Scripts/Utils/Extends/UIInputExtensions.cs @@ -0,0 +1,7 @@ +namespace NBF +{ + public static class UIInputExtensions + { + + } +} \ No newline at end of file diff --git a/Assets/Scripts/Utils/Extends/UIInputExtensions.cs.meta b/Assets/Scripts/Utils/Extends/UIInputExtensions.cs.meta new file mode 100644 index 000000000..8d87b4530 --- /dev/null +++ b/Assets/Scripts/Utils/Extends/UIInputExtensions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e9bfb9f042814fb787428551c801aada +timeCreated: 1748944711 \ No newline at end of file diff --git a/Assets/Scripts/Utils/Reflection.cs b/Assets/Scripts/Utils/Reflection.cs index 9699f8352..926bcc755 100644 --- a/Assets/Scripts/Utils/Reflection.cs +++ b/Assets/Scripts/Utils/Reflection.cs @@ -36,5 +36,35 @@ namespace NBF return derivedTypes; } + + + /// + /// 获取所有标记指定特性的方法 + /// + /// 查找类 + /// 特性类 + /// + public static List GetMethodsWithUIInputAttribute(Type classType, Type attributeType) + { + List methodsWithAttribute = new List(); + + if (classType == null) + { + return methodsWithAttribute; + } + + // 获取所有方法,包括公共、非公共、实例和静态方法 + MethodInfo[] allMethods = classType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic); + + foreach (MethodInfo method in allMethods) + { + if (method.GetCustomAttributes(attributeType, false).Length > 0) + { + methodsWithAttribute.Add(method); + } + } + + return methodsWithAttribute; + } } } \ No newline at end of file diff --git a/FGUIProject/assets/Common/Com/MarqueeTag.xml b/FGUIProject/assets/Common/Com/MarqueeTag.xml new file mode 100644 index 000000000..5df85e873 --- /dev/null +++ b/FGUIProject/assets/Common/Com/MarqueeTag.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/FGUIProject/assets/Common/Panel/CommonTopPanel.xml b/FGUIProject/assets/Common/Panel/CommonTopPanel.xml new file mode 100644 index 000000000..880c427da --- /dev/null +++ b/FGUIProject/assets/Common/Panel/CommonTopPanel.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/FGUIProject/assets/Common/package.xml b/FGUIProject/assets/Common/package.xml index 308652779..6963012bb 100644 --- a/FGUIProject/assets/Common/package.xml +++ b/FGUIProject/assets/Common/package.xml @@ -192,6 +192,8 @@ + + \ No newline at end of file diff --git a/FGUIProject/assets/Main/Com/Home/BtnHomeMap.xml b/FGUIProject/assets/Main/Com/Home/BtnHomeMap.xml index 0101e87c0..2a8437e63 100644 --- a/FGUIProject/assets/Main/Com/Home/BtnHomeMap.xml +++ b/FGUIProject/assets/Main/Com/Home/BtnHomeMap.xml @@ -6,9 +6,10 @@ + -