UI 系统
This commit is contained in:
@@ -131,12 +131,14 @@ namespace BaseGames.Editor.UI
|
||||
|
||||
if (created)
|
||||
{
|
||||
var items = new (string key, PauseMenuAction a)[]
|
||||
// 暂停为薄覆盖层,仅系统级动作;查看/装备类(形态技能 / 能力 / 地图 / 护符 / 物品)
|
||||
// 一律收敛进统一背包 Tab 屏(PanelId.Inventory),不再从暂停跳转。
|
||||
var items = new (string key, PauseMenuAction a, PanelId panel)[]
|
||||
{
|
||||
("PAUSE_RESUME", PauseMenuAction.Resume),
|
||||
("MENU_SETTINGS", PauseMenuAction.OpenSettings),
|
||||
("PAUSE_MAIN_MENU", PauseMenuAction.ReturnToMainMenu),
|
||||
("MENU_QUIT", PauseMenuAction.Quit),
|
||||
("PAUSE_RESUME", PauseMenuAction.Resume, PanelId.Pause),
|
||||
("MENU_SETTINGS", PauseMenuAction.OpenSettings, PanelId.Pause),
|
||||
("PAUSE_MAIN_MENU", PauseMenuAction.ReturnToMainMenu, PanelId.Pause),
|
||||
("MENU_QUIT", PauseMenuAction.Quit, PanelId.Pause),
|
||||
};
|
||||
var so = new SerializedObject(cfg);
|
||||
var prop = so.FindProperty("_items");
|
||||
@@ -144,9 +146,10 @@ namespace BaseGames.Editor.UI
|
||||
for (int i = 0; i < items.Length; i++)
|
||||
{
|
||||
var el = prop.GetArrayElementAtIndex(i);
|
||||
el.FindPropertyRelative("labelKey").stringValue = items[i].key;
|
||||
el.FindPropertyRelative("action").enumValueIndex = (int)items[i].a;
|
||||
el.FindPropertyRelative("sceneKey").stringValue = "";
|
||||
el.FindPropertyRelative("labelKey").stringValue = items[i].key;
|
||||
el.FindPropertyRelative("action").enumValueIndex = (int)items[i].a;
|
||||
el.FindPropertyRelative("targetPanel").enumValueIndex = (int)items[i].panel;
|
||||
el.FindPropertyRelative("sceneKey").stringValue = "";
|
||||
}
|
||||
so.ApplyModifiedPropertiesWithoutUndo();
|
||||
report.Add($"{path}(默认 {items.Length} 项)");
|
||||
|
||||
Reference in New Issue
Block a user