UI系统优化

This commit is contained in:
2026-05-25 11:54:37 +08:00
parent c7057db27d
commit 3c812cfb41
130 changed files with 4738 additions and 477 deletions

View File

@@ -1,7 +1,9 @@
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using BaseGames.Core;
using BaseGames.Core.Assets;
using BaseGames.Core.Events;
namespace BaseGames.UI.MainMenu
@@ -61,7 +63,7 @@ namespace BaseGames.UI.MainMenu
[Header("场景")]
[Tooltip("新游戏 / 继续后进入的第一个游戏场景Addressable Key")]
[SerializeField] private string _firstGameSceneKey = "Scene_Game_Chapter1";
[SerializeField] private string _firstGameSceneKey = AddressKeys.SceneGameChapter1;
// ── Event Channels ────────────────────────────────────────────────────
@@ -148,6 +150,9 @@ namespace BaseGames.UI.MainMenu
_mainButtonsGroup.interactable = true;
_mainButtonsGroup.blocksRaycasts = true;
// 手柄导航:入场动画完成后将焦点置于第一个按钮
EventSystem.current?.SetSelectedGameObject(_btnNewGame?.gameObject);
}
// ── 按钮回调 ─────────────────────────────────────────────────────────