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

20 lines
545 B
C#
Raw Normal View History

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