various fixes and improvements. size changes for headers, deactivate containement for collections.

This commit is contained in:
Chandler Cox
2023-01-21 13:35:51 -06:00
parent 634eb0973b
commit 66fd5e716c
5 changed files with 26 additions and 6 deletions

View File

@@ -131,6 +131,12 @@ namespace FlaxEngine.GUI
[EditorDisplay("Style"), EditorOrder(2000)]
public bool EnableDropDownIcon { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to enable containment line drawing,
/// </summary>
[EditorDisplay("Style"), EditorOrder(2000)]
public bool EnableContainmentLines { get; set; } = false;
/// <summary>
/// Occurs when mouse right-clicks over the header.
/// </summary>
@@ -370,6 +376,16 @@ namespace FlaxEngine.GUI
Render2D.DrawText(HeaderTextFont.GetFont(), HeaderTextMaterial, HeaderText, textRect, textColor, TextAlignment.Near, TextAlignment.Center);
if (!_isClosed && EnableContainmentLines)
{
Color lineColor = Style.Current.ForegroundGrey - new Color(0, 0, 0, 100);
float lineThickness = 0.05f;
Render2D.DrawLine(new Float2(1, HeaderHeight), new Float2(1, Height), lineColor, lineThickness);
Render2D.DrawLine(new Float2(1, Height), new Float2(Width, Height), lineColor, lineThickness);
Render2D.DrawLine(new Float2(Width, HeaderHeight), new Float2(Width, Height), lineColor, lineThickness);
}
// Children
DrawChildren();
}