mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 08:18:49 -05:00
22 lines
733 B
C#
22 lines
733 B
C#
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)
|
|
{
|
|
return new TriBoxGroupElement(new TriBoxGroupElement.Props
|
|
{
|
|
title = attribute.Title,
|
|
titleMode = TriBoxGroupElement.TitleMode.Foldout,
|
|
expandedByDefault = attribute.Expanded,
|
|
hideIfChildrenInvisible = true,
|
|
});
|
|
}
|
|
}
|
|
} |