主界面相关

This commit is contained in:
bob
2025-06-03 14:28:20 +08:00
parent 8ba78d5d1c
commit 9334999332
43 changed files with 534 additions and 14 deletions

View File

@@ -0,0 +1,25 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class 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);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 5cee4ebc54c0f434f9443cee69971ab3

View File

@@ -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()
{
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7341727571ae65c4bbc3ce2bd9a94e8b

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 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);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 044cd5f648db2c94ea89ef77f1891ed4

View File

@@ -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<HomePanel>();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 648dd38953354c94a89c7c23d24abeb3

View File

@@ -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();
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: fb0a4fb73e0c4eafa11ab8028331637b
timeCreated: 1748925820

View File

@@ -0,0 +1,25 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class 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);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b909a0d4f6fa0b441bd779977ab6403a

View File

@@ -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()
{
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 40506befb27a31a4786085ec5416efc7