From da03147b38762985773269266cf9bad80a139bf6 Mon Sep 17 00:00:00 2001 From: LiRuoChen <571244399@qq.com> Date: Mon, 20 Jul 2026 14:50:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A8=E6=A0=BC=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/XTable/XTableEditorOverlay.cs | 2 +- Editor/XTable/XericUIActionTableEditor.cs | 4 +++- Editor/XTable/XericUIActionTableSceneEditor.cs | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Editor/XTable/XTableEditorOverlay.cs b/Editor/XTable/XTableEditorOverlay.cs index 4a32ee3..f491d2d 100644 --- a/Editor/XTable/XTableEditorOverlay.cs +++ b/Editor/XTable/XTableEditorOverlay.cs @@ -17,7 +17,7 @@ namespace XericUIEditor.XTable /// 是否启用覆盖层(可通过菜单开关) private static bool s_Enabled = true; - private const string MENU_PATH = "XericLibrary/UI/Table/表格编辑器覆盖层"; + internal const string MENU_PATH = "XericLibrary/UI/Table/Table Editor Override Layer"; [MenuItem(MENU_PATH, false, 200)] private static void ToggleOverlay() diff --git a/Editor/XTable/XericUIActionTableEditor.cs b/Editor/XTable/XericUIActionTableEditor.cs index b816a65..a40646d 100644 --- a/Editor/XTable/XericUIActionTableEditor.cs +++ b/Editor/XTable/XericUIActionTableEditor.cs @@ -23,6 +23,8 @@ namespace XericUIEditor.XTable private SerializedProperty m_DefaultStyleNsProp; private SerializedProperty m_ScrollRectProp; + internal const string MENU_PATH = "GameObject/Xeric Library/Table/Xeric UI Action Table"; + // 折叠状态 private static bool s_StyleFoldout = true; private static bool s_SizeFoldout = true; @@ -273,7 +275,7 @@ namespace XericUIEditor.XTable #region Hierarchy 创建菜单 - [MenuItem("GameObject/Xeric UI/Table/Xeric UI Action Table", false, 60)] + [MenuItem(MENU_PATH, false, 60)] private static void CreateTable(MenuCommand menuCommand) { // 1. 创建根节点:ScrollRect + Image + XericUIActionTable 共存于同一 GameObject diff --git a/Editor/XTable/XericUIActionTableSceneEditor.cs b/Editor/XTable/XericUIActionTableSceneEditor.cs index b1fbd4c..acd89d4 100644 --- a/Editor/XTable/XericUIActionTableSceneEditor.cs +++ b/Editor/XTable/XericUIActionTableSceneEditor.cs @@ -69,19 +69,19 @@ namespace XericUIEditor.XTable SceneView.duringSceneGui += OnSceneGUI; } - [MenuItem("XericLibrary/UI/Table/表格编辑器覆盖层", false, 200)] + [MenuItem(XTableEditorOverlay.MENU_PATH, false, 200)] private static void ToggleEnabled() { s_Enabled = !s_Enabled; EditorPrefs.SetBool(ENABLED_KEY, s_Enabled); - Menu.SetChecked("XericLibrary/UI/Table/表格编辑器覆盖层", s_Enabled); + Menu.SetChecked(XTableEditorOverlay.MENU_PATH, s_Enabled); SceneView.RepaintAll(); } - [MenuItem("XericLibrary/UI/Table/表格编辑器覆盖层", true)] + [MenuItem(XTableEditorOverlay.MENU_PATH, true)] private static bool ToggleEnabledValidate() { - Menu.SetChecked("XericLibrary/UI/Table/表格编辑器覆盖层", s_Enabled); + Menu.SetChecked(XTableEditorOverlay.MENU_PATH, s_Enabled); return true; }