主页面

This commit is contained in:
bob
2025-06-03 11:45:53 +08:00
parent f1aa7207b7
commit 8ba78d5d1c
39 changed files with 303 additions and 31 deletions

View File

@@ -0,0 +1,43 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class HomeButtonGroups
{
public const string URL = "ui://hxr7rc7plvqln";
public GButton BtnMap;
public GButton BtnMessage;
public GButton BtnExit;
public GButton BtnSettings;
public GButton BtnStatistics;
public GButton BtnBag;
public GButton BtnSkill;
public GButton BtnPass;
public GButton BtnMission;
public GButton BtnTournament;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
BtnMap = (GButton)GetChild("BtnMap");
BtnMessage = (GButton)GetChild("BtnMessage");
BtnExit = (GButton)GetChild("BtnExit");
BtnSettings = (GButton)GetChild("BtnSettings");
BtnStatistics = (GButton)GetChild("BtnStatistics");
BtnBag = (GButton)GetChild("BtnBag");
BtnSkill = (GButton)GetChild("BtnSkill");
BtnPass = (GButton)GetChild("BtnPass");
BtnMission = (GButton)GetChild("BtnMission");
BtnTournament = (GButton)GetChild("BtnTournament");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 008c0b556690f1a4f9ea76cb05b6746e

View File

@@ -0,0 +1,31 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class HomeButtonGroups : GComponent
{
private void OnInited()
{
this.AutoAddClick(OnClick);
}
private void OnClick(GComponent btn)
{
if (btn == BtnExit)
{
MessageBox.Show("确定推出到桌面吗?", (b) =>
{
if (b) Application.Quit();
});
}
else if (btn == BtnSettings)
{
UI.Inst.OpenUI<SettingPanel>();
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 52070c9a16d995346a51eb093365c170

View File

@@ -11,8 +11,12 @@ namespace NBF
public partial class HomePanel
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
[AutoFind(Name = "Bottom")]
public BottomMenu Bottom;
[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"}; }