Files
Fishing2/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs
2025-06-03 18:09:30 +08:00

51 lines
1.2 KiB
C#

// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using System.Collections.Generic;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class HomeMainPage : HomePageBase
{
private List<GButton> _buttons = new List<GButton>();
private void OnInited()
{
_buttons.Add(OpGroup.BtnGo);
}
protected override void OnShow()
{
InputManager.OnUICanceled += OnUICanceled;
UseBottomMenu();
}
protected override void OnHide()
{
InputManager.OnUICanceled -= OnUICanceled;
}
private void OnUICanceled(string action)
{
if (!Panel.IsTop) return;
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.Use(Panel);
}
}
}