2022-11-13 05:38:45 -05:00
|
|
|
|
using TriInspector;
|
|
|
|
|
using TriInspector.Elements;
|
|
|
|
|
using TriInspector.GroupDrawers;
|
|
|
|
|
|
|
|
|
|
[assembly: RegisterTriGroupDrawer(typeof(TriFoldoutGroupDrawer))]
|
|
|
|
|
|
|
|
|
|
namespace TriInspector.GroupDrawers
|
|
|
|
|
{
|
|
|
|
|
public class TriFoldoutGroupDrawer : TriGroupDrawer<DeclareFoldoutGroupAttribute>
|
|
|
|
|
{
|
|
|
|
|
public override TriPropertyCollectionBaseElement CreateElement(DeclareFoldoutGroupAttribute attribute)
|
|
|
|
|
{
|
2022-12-07 02:13:28 -05:00
|
|
|
|
return new TriBoxGroupElement(new TriBoxGroupElement.Props
|
2022-11-13 05:38:45 -05:00
|
|
|
|
{
|
2022-12-07 02:13:28 -05:00
|
|
|
|
title = attribute.Title,
|
|
|
|
|
titleMode = TriBoxGroupElement.TitleMode.Foldout,
|
2022-11-13 05:38:45 -05:00
|
|
|
|
expandedByDefault = attribute.Expanded,
|
2023-06-24 08:55:43 -04:00
|
|
|
|
hideIfChildrenInvisible = true,
|
2022-11-13 05:38:45 -05:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|