修改设置界面
This commit is contained in:
20
Assets/Scripts/UI/Home/HomePanel.Designer.cs
generated
Normal file
20
Assets/Scripts/UI/Home/HomePanel.Designer.cs
generated
Normal 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"}; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/HomePanel.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Home/HomePanel.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0a04e215aee16649989877727ea91ad
|
||||
33
Assets/Scripts/UI/Home/HomePanel.cs
Normal file
33
Assets/Scripts/UI/Home/HomePanel.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/HomePanel.cs.meta
Normal file
2
Assets/Scripts/UI/Home/HomePanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c861edcf3de96ad479e0496632f0cd98
|
||||
32
Assets/Scripts/UI/Home/SettingPanel.Designer.cs
generated
Normal file
32
Assets/Scripts/UI/Home/SettingPanel.Designer.cs
generated
Normal 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"}; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/SettingPanel.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Home/SettingPanel.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5bd9a89782b28a342b84154c6ca06d32
|
||||
79
Assets/Scripts/UI/Home/SettingPanel.cs
Normal file
79
Assets/Scripts/UI/Home/SettingPanel.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/SettingPanel.cs.meta
Normal file
2
Assets/Scripts/UI/Home/SettingPanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9daadae7a1573774cb1b07ea9dc5b077
|
||||
Reference in New Issue
Block a user