修改设置界面

This commit is contained in:
bob
2025-05-29 18:03:24 +08:00
parent cdcb007d6d
commit f421288244
306 changed files with 41744 additions and 612 deletions

View File

@@ -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
{
/// <summary> </summary>
public partial class HomePanel
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
[AutoFind(Name = "BtnGo")]
public GButton BtnGo;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
}
}

View File

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

View File

@@ -0,0 +1,33 @@
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using UnityEngine;
using NBC;
namespace NBF
{
public partial class HomePanel : UIPanel
{
public override string UIPackName => "Main";
public override string UIResName => "HomePanel";
protected override void OnInit()
{
base.OnInit();
}
protected override void OnShow()
{
base.OnShow();
}
protected override void OnHide()
{
base.OnHide();
}
protected override void OnDestroy()
{
base.OnDestroy();
}
}
}

View File

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

View File

@@ -0,0 +1,32 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
using System.Collections.Generic;
namespace NBF
{
/// <summary> </summary>
public partial class SettingPanel
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
[AutoFind(Name = "back")]
public GImage back;
[AutoFind(Name = "Menu")]
public CommonMenu Menu;
[AutoFind(Name = "TextTitle")]
public GTextField TextTitle;
[AutoFind(Name = "Introduce")]
public GComponent Introduce;
[AutoFind(Name = "List")]
public GList List;
[AutoFind(Name = "BottomMenu")]
public BottomMenu BottomMenu;
[AutoFind(Name = "BottomLine")]
public GImage BottomLine;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
}
}

View File

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

View File

@@ -0,0 +1,79 @@
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using System.Collections.Generic;
using UnityEngine;
using NBC;
namespace NBF
{
public partial class SettingPanel : UIPanel
{
public override string UIPackName => "Main";
public override string UIResName => "SettingPanel";
private List<TabListSettingData> tabList = new List<TabListSettingData>();
protected override void OnInit()
{
base.OnInit();
IsShowCursor = true;
TabListSettingData tabInput = new TabListSettingData();
tabInput.Tab = new TabItemData();
tabInput.Tab.Name = "键盘和鼠标";
tabList.Add(tabInput);
TabListSettingData tabCtrl = new TabListSettingData();
tabCtrl.Tab = new TabItemData();
tabCtrl.Tab.Name = "控制器";
tabList.Add(tabCtrl);
TabListSettingData tabVideo = new TabListSettingData();
tabVideo.Tab = new TabItemData();
tabVideo.Tab.Name = "视频";
tabVideo.SettingsObject = GameSettings.Instance.UseSettings;
tabList.Add(tabVideo);
TabListSettingData tabSound = new TabListSettingData();
tabSound.Tab = new TabItemData();
tabSound.Tab.Name = "音频和语言";
tabList.Add(tabSound);
Menu.OnTabChange += ChangeTab;
}
protected override void OnShow()
{
Menu.SetTabs(tabList);
}
private void ChangeTab(int index)
{
Log.Info($"Change tab index={index}");
// var tabListData = _tabList[index];
// _currentTab = tabListData;
// SubMenu.SetTabs(_currentTab.SubTab);
}
private void Reset()
{
}
private void Save()
{
}
protected override void OnHide()
{
base.OnHide();
}
protected override void OnDestroy()
{
base.OnDestroy();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9daadae7a1573774cb1b07ea9dc5b077