布局功能增加黑白名单功能。

This commit is contained in:
2025-09-18 17:17:34 +08:00
parent ddb6806a9b
commit a84e583dec
5 changed files with 140 additions and 12 deletions
@@ -10,23 +10,47 @@ namespace XericUIEditor.OverrideLayout
public class XericHorizontalOrVerticalLayoutGroupEditor : HorizontalOrVerticalLayoutGroupEditor
{
SerializedProperty ignoreInvisible;
SerializedProperty enableListScreening;
SerializedProperty blackListMode;
SerializedProperty whiteList_list;
SerializedProperty blackList_list;
protected override void OnEnable()
{
base.OnEnable();
ignoreInvisible = serializedObject.FindProperty("layoutIgnoreInactive");
enableListScreening = serializedObject.FindProperty("enableListScreening");
blackListMode = serializedObject.FindProperty("blackListMode");
whiteList_list = serializedObject.FindProperty("m_whiteList_list");
blackList_list = serializedObject.FindProperty("m_blackList_list");
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
serializedObject.Update();
EditorGUILayout.PropertyField(ignoreInvisible, true);
EditorGUILayout.PropertyField(enableListScreening);
if (enableListScreening.boolValue)
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(blackListMode,
EditorGUIUtility.TrTextContent(blackListMode.boolValue ? "Black List Mode" : "White List Mode"));
if (blackListMode.boolValue)
EditorGUILayout.PropertyField(blackList_list, EditorGUIUtility.TrTextContent("Black List"));
else
EditorGUILayout.PropertyField(whiteList_list, EditorGUIUtility.TrTextContent("White List"));
EditorGUI.indentLevel--;
}
else
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(ignoreInvisible, true);
EditorGUI.indentLevel--;
}
serializedObject.ApplyModifiedProperties();
}
}
}