2023-04-09 12:51:22 -04:00
|
|
|
|
using TriInspector;
|
|
|
|
|
using TriInspector.Elements;
|
|
|
|
|
using TriInspector.GroupDrawers;
|
|
|
|
|
|
|
|
|
|
[assembly: RegisterTriGroupDrawer(typeof(TriToggleGroupDrawer))]
|
|
|
|
|
|
|
|
|
|
namespace TriInspector.GroupDrawers
|
|
|
|
|
{
|
|
|
|
|
public class TriToggleGroupDrawer : TriGroupDrawer<DeclareToggleGroupAttribute>
|
|
|
|
|
{
|
|
|
|
|
public override TriPropertyCollectionBaseElement CreateElement(DeclareToggleGroupAttribute attribute)
|
|
|
|
|
{
|
|
|
|
|
return new TriBoxGroupElement(new TriBoxGroupElement.Props
|
|
|
|
|
{
|
|
|
|
|
title = attribute.Title,
|
|
|
|
|
titleMode = TriBoxGroupElement.TitleMode.Toggle,
|
|
|
|
|
expandedByDefault = attribute.Collapsible,
|
2023-06-24 08:55:43 -04:00
|
|
|
|
hideIfChildrenInvisible = true,
|
2023-04-09 12:51:22 -04:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|