Skip to content

Commit ec71246

Browse files
committed
Add HorizontalLine to Title attribute
1 parent abcd8b1 commit ec71246

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Editor.Extras/Drawers/TitleDrawer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ public override void OnGUI(Rect position, TriProperty property, TriElement next)
6363

6464
var title = _titleResolver.GetValue(property, "Error");
6565
GUI.Label(titleRect, title, EditorStyles.boldLabel);
66-
EditorGUI.DrawRect(lineRect, Color.gray);
66+
67+
if (Attribute.HorizontalLine)
68+
{
69+
EditorGUI.DrawRect(lineRect, Color.gray);
70+
}
6771

6872
next.OnGUI(contentRect);
6973
}

Runtime/Attributes/TitleAttribute.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace TriInspector
88
public sealed class TitleAttribute : Attribute
99
{
1010
public string Title { get; }
11+
public bool HorizontalLine { get; set; } = true;
1112

1213
public TitleAttribute(string title)
1314
{

0 commit comments

Comments
 (0)