mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 16:28:23 -05:00
20 lines
602 B
C#
20 lines
602 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)
|
|
{
|
|
using (var indentedRectScope = TriGuiHelper.PushIndentedRect(position, Attribute.Indent))
|
|
{
|
|
next.OnGUI(indentedRectScope.IndentedRect);
|
|
}
|
|
}
|
|
}
|
|
} |