(client):feat:添加对列表定义读取的支持,ui管理器将对没有键的窗口也进行统一管理
This commit is contained in:
@ -11,11 +11,6 @@ namespace UI
|
||||
|
||||
public Prefab.TextPrefab textTemplate;
|
||||
public Prefab.ButtonPrefab buttonTemplate;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
actionButton = KeyCode.F1;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
@ -27,6 +22,9 @@ namespace UI
|
||||
InitEvent();
|
||||
InitCharacter();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void InitEvent()
|
||||
{
|
||||
var title = InstantiatePrefab(textTemplate, menuContent.transform);
|
||||
@ -42,7 +40,7 @@ namespace UI
|
||||
void InitCharacter()
|
||||
{
|
||||
var title = InstantiatePrefab(textTemplate, menuContent.transform);
|
||||
title.Label = "点击切换人物";
|
||||
title.Label = "生成人物";
|
||||
|
||||
var defList = Managers.DefineManager.Instance.QueryNamedDefinesByType<Data.CharacterDef>();
|
||||
foreach (var def in defList)
|
||||
|
24
Client/Assets/Scripts/UI/EscUI.cs
Normal file
24
Client/Assets/Scripts/UI/EscUI.cs
Normal file
@ -0,0 +1,24 @@
|
||||
namespace UI
|
||||
{
|
||||
public class EscUI:UIBase
|
||||
{
|
||||
public void ContinueButton()
|
||||
{
|
||||
Base.UIInputControl.Instance.CloseWindow(this);
|
||||
}
|
||||
|
||||
public void ExitButton()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorApplication.isPlaying = false; // 停止编辑器播放模式
|
||||
#else
|
||||
Application.Quit(); // 关闭游戏
|
||||
#endif
|
||||
}
|
||||
|
||||
public void SettingsButton()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
3
Client/Assets/Scripts/UI/EscUI.cs.meta
Normal file
3
Client/Assets/Scripts/UI/EscUI.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7eac7c56e1474c4ea646c0a408d293a3
|
||||
timeCreated: 1752932683
|
8
Client/Assets/Scripts/UI/PauseUI.cs
Normal file
8
Client/Assets/Scripts/UI/PauseUI.cs
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class PauseUI : UIBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
3
Client/Assets/Scripts/UI/PauseUI.cs.meta
Normal file
3
Client/Assets/Scripts/UI/PauseUI.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bcc7e9d015ee465684be520b65c2e182
|
||||
timeCreated: 1752932641
|
Reference in New Issue
Block a user