Tri-Inspector/Editor.Extras/Drawers/IndentDrawer.cs

19 lines
540 B
C#
Raw Normal View History

2021-12-07 10:20:36 -05:00
using TriInspector;
using TriInspector.Drawers;
using TriInspector.Utilities;
using UnityEngine;
[assembly: RegisterTriDrawer(typeof(IndentDrawer), TriDrawerOrder.Decorator)]
namespace TriInspector.Drawers
{
public class IndentDrawer : TriAttributeDrawer<IndentAttribute>
{
public override void OnGUI(Rect position, TriProperty property, TriElement next)
{
TriGuiHelper.PushIndentLevel(Attribute.Indent);
next.OnGUI(position);
TriGuiHelper.PopIndentLevel();
}
}
}