优化表格系统编辑器的菜单路径
This commit is contained in:
@@ -17,7 +17,7 @@ namespace XericUIEditor.XTable
|
||||
/// <summary>是否启用覆盖层(可通过菜单开关)</summary>
|
||||
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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user