UI系统优化
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
// ── 按钮回调 ─────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user