This commit is contained in:
Mikhail 2024-06-15 19:30:59 +08:00
parent 0c66a1254e
commit 962b33e355
2 changed files with 3 additions and 2 deletions

View File

@ -192,6 +192,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
optionButton.yMax += HeadIconsRect.height;
optionButton.xMin = optionButton.xMax - 64;
optionButton.center += Vector2.up * Padding * 1f;
//Canceling isExpanded
if (EcsGUI.HitTest(optionButton) && Event.current.type == EventType.MouseUp)
{
componentProperty.isExpanded = !componentProperty.isExpanded;
@ -218,6 +219,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
EcsGUI.DescriptionIcon(optionButton, description);
}
if (propCount <= 0)
{
EcsGUI.DrawEmptyComponentProperty(paddingPosition, componentRefProp, label, false);

View File

@ -599,13 +599,13 @@ namespace DCFApixels.DragonECS.Unity.Editors
optionButton.yMax += HeadIconsRect.height;
optionButton.xMin = optionButton.xMax - 64;
optionButton.center += Vector2.up * padding * 2f;
//Canceling isExpanded
if (HitTest(optionButton) && Event.current.type == EventType.MouseUp)
{
ref bool isExpanded = ref expandMatrix.Down();
isExpanded = !isExpanded;
}
GUILayout.BeginVertical(UnityEditorUtility.GetStyle(panelColor, EscEditorConsts.COMPONENT_DRAWER_ALPHA));
EditorGUI.BeginChangeCheck();
@ -635,7 +635,6 @@ namespace DCFApixels.DragonECS.Unity.Editors
pool.SetRaw(entityID, resultData);
}
GUILayout.EndVertical();
}
}