Merge commit '997baa3b774ac4dea739e15a55070519b0863afc' into dotnet7

This commit is contained in:
Wojtek Figat
2023-01-25 20:13:34 +01:00
28 changed files with 69 additions and 44 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();
}