Tri-Inspector/Editor.Extras/Drawers/IndentDrawer.cs
2022-01-06 20:19:19 +03:00

19 lines
549 B
C#

using TriInspector;
using TriInspector.Drawers;
using TriInspector.Utilities;
using UnityEngine;
[assembly: RegisterTriAttributeDrawer(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();
}
}
}