home打开关闭逻辑修改调整提交

This commit is contained in:
2026-02-04 09:11:27 +08:00
parent 10c6fabd73
commit c7676793d5
36 changed files with 2023 additions and 708 deletions

View File

@@ -10,6 +10,7 @@ namespace NBF
public static void BindAll()
{
UIObjectFactory.SetPackageItemExtension(SelectPages.URL, typeof(SelectPages));
UIObjectFactory.SetPackageItemExtension(UIBlurBackground.URL, typeof(UIBlurBackground));
UIObjectFactory.SetPackageItemExtension(BottomMenu.URL, typeof(BottomMenu));
UIObjectFactory.SetPackageItemExtension(CommonInput.URL, typeof(CommonInput));
UIObjectFactory.SetPackageItemExtension(ClassifyList.URL, typeof(ClassifyList));

View File

@@ -17,6 +17,17 @@ namespace NBF
protected override void OnShow()
{
InputManager.OnUICanceled += OnUICanceled;
}
private void OnUICanceled(string action)
{
if (action == InputDef.UI.Back)
{
var panel = UI.Inst.GetUI<HomePanel>();
if (panel != null && panel.IsShowing) return;
HomePanel.Show();
}
}
protected override void OnUpdate()
@@ -60,6 +71,7 @@ namespace NBF
protected override void OnHide()
{
InputManager.OnUICanceled -= OnUICanceled;
}
protected override void OnDestroy()

View File

@@ -36,10 +36,21 @@ namespace NBF
protected override void OnShow()
{
InputManager.Instance.On(this);
Menu.SetTabs(tabList);
ChangeTab(0);
}
#region UI事件
[InputInvoke(InputDef.UI.Back, UIInputButtonShowMode.BottomRight)]
private void OnBack()
{
Hide();
}
#endregion
#region Tab切换
private void ChangeTab(int index)
@@ -84,6 +95,7 @@ namespace NBF
protected override void OnHide()
{
InputManager.Instance.Off(this);
}
protected override void OnDestroy()

View File

@@ -30,15 +30,15 @@ namespace NBF
{
await LoginHelper.Login(InputAccount.text);
// await Fishing.Instance.Go(RoleModel.Instance.Info.MapId);
await Fishing.Instance.Go(RoleModel.Instance.Info.MapId);
// await MapHelper.EnterMap(mapId, role.RoomCode);
// BagPanel.Show();
// BagSlotPanel.Show();
// SettingPanel.Show();
HomePanel.Show();
// FishingShopPanel.Show();
// HomePanel.Show();
FishingShopPanel.Show();
Del();
}

View File

@@ -0,0 +1,27 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class UIBlurBackground
{
public const string URL = "ui://6hgkvlau8hy8la";
public GLoader Back;
public GImage back;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
Back = (GLoader)GetChild("Back");
back = (GImage)GetChild("back");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 37696980c373d4d46884022914bfe1b9

View File

@@ -0,0 +1,31 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class UIBlurBackground : GLabel
{
private NTexture _nTexture;
private void OnInited()
{
// icon = new NTexture(your_Texture2D);
// UIBlur.texture = new NTexture(UIBlur);
UIBlur.Instance.CaptureAndBlurOnce();
Back.texture = new NTexture(UIBlur.Instance.blurRT);
}
public override void Dispose()
{
// if (_nTexture != null)
// {
// _nTexture = null;
// }
base.Dispose();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 93754091e25692446aabdab03d905f42