Merge branch 'elementContainers' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-elementContainers
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
|
using FlaxEngine.GUI;
|
||||||
|
|
||||||
|
namespace FlaxEditor.CustomEditors.Elements
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The horizontal panel element.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.CustomEditors.LayoutElement" />
|
||||||
|
public class HorizontalPanelElement : LayoutElementsContainer
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The panel.
|
||||||
|
/// </summary>
|
||||||
|
public readonly HorizontalPanel Panel = new HorizontalPanel();
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override ContainerControl ContainerControl => Panel;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -102,6 +102,28 @@ namespace FlaxEditor.CustomEditors
|
|||||||
Editor.Instance.ProjectCache.SetCollapsedGroup(panel.HeaderText, panel.IsClosed);
|
Editor.Instance.ProjectCache.SetCollapsedGroup(panel.HeaderText, panel.IsClosed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds new horizontal panel element.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The created element.</returns>
|
||||||
|
public HorizontalPanelElement HorizontalPanel()
|
||||||
|
{
|
||||||
|
var element = new HorizontalPanelElement();
|
||||||
|
OnAddElement(element);
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds new horizontal panel element.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The created element.</returns>
|
||||||
|
public VerticalPanelElement VerticalPanel()
|
||||||
|
{
|
||||||
|
var element = new VerticalPanelElement();
|
||||||
|
OnAddElement(element);
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds new button element.
|
/// Adds new button element.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user