Add controls to the ActorToolbox in the GUI tab. Add dragging and dropping controls from toolbox into scene and prefab trees.

This commit is contained in:
Chandler Cox
2024-04-27 15:55:25 -05:00
parent c5520f2777
commit 18660140b0
30 changed files with 301 additions and 9 deletions

View File

@@ -7,6 +7,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// UI canvas scaling component for user interface that targets multiple different game resolutions (eg. mobile screens).
/// </summary>
[ActorToolbox("GUI")]
public class CanvasScaler : ContainerControl
{
/// <summary>

View File

@@ -5,6 +5,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Border control that draws the border around the control edges (inner and outer sides).
/// </summary>
[ActorToolbox("GUI")]
public class Border : ContainerControl
{
/// <summary>

View File

@@ -7,6 +7,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Button control
/// </summary>
[ActorToolbox("GUI")]
public class Button : ContainerControl
{
/// <summary>

View File

@@ -29,6 +29,7 @@ namespace FlaxEngine.GUI
/// Check box control.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.Control" />
[ActorToolbox("GUI")]
public class CheckBox : Control
{
/// <summary>

View File

@@ -9,6 +9,7 @@ namespace FlaxEngine.GUI
/// Dropdown menu control allows to choose one item from the provided collection of options.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ContainerControl" />
[ActorToolbox("GUI")]
public class Dropdown : ContainerControl
{
/// <summary>

View File

@@ -8,6 +8,7 @@ namespace FlaxEngine.GUI
/// The basic GUI image control. Shows texture, sprite or render target.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ContainerControl" />
[ActorToolbox("GUI")]
public class Image : ContainerControl
{
/// <summary>

View File

@@ -8,6 +8,7 @@ namespace FlaxEngine.GUI
/// The basic GUI label control.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ContainerControl" />
[ActorToolbox("GUI")]
public class Label : ContainerControl
{
/// <summary>

View File

@@ -8,6 +8,7 @@ namespace FlaxEngine.GUI
/// Progress bar control shows visual progress of the action or set of actions.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.Control" />
[ActorToolbox("GUI")]
public class ProgressBar : ContainerControl
{
/// <summary>

View File

@@ -5,6 +5,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// UI container control that can render children to texture and display pre-cached texture instead of drawing children every frame. It can be also used to render part of UI to texture and use it in material or shader.
/// </summary>
[ActorToolbox("GUI")]
public class RenderToTextureControl : ContainerControl
{
private bool _invalid, _redrawRegistered, _isDuringTextureDraw;

View File

@@ -7,6 +7,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Rich text box control which can gather text input from the user and present text in highly formatted and stylized way.
/// </summary>
[ActorToolbox("GUI")]
public partial class RichTextBox : RichTextBoxBase
{
private TextBlockStyle _textStyle;

View File

@@ -7,6 +7,7 @@ namespace FlaxEngine.GUI;
/// <summary>
/// The slider control.
/// </summary>
[ActorToolbox("GUI")]
public class Slider : ContainerControl
{
/// <summary>

View File

@@ -6,6 +6,7 @@ namespace FlaxEngine.GUI
/// Helper control used to insert blank space into the layout.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ContainerControl" />
[ActorToolbox("GUI")]
public sealed class Spacer : ContainerControl
{
/// <summary>

View File

@@ -5,6 +5,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Text box control which can gather text input from the user.
/// </summary>
[ActorToolbox("GUI")]
public class TextBox : TextBoxBase
{
private TextLayoutOptions _layout;

View File

@@ -5,6 +5,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Changes alpha of all its children
/// </summary>
[ActorToolbox("GUI")]
public class AlphaPanel : ContainerControl
{
/// <summary>

View File

@@ -6,6 +6,7 @@ namespace FlaxEngine.GUI
/// The blur panel that applied the Gaussian-blur to all content beneath the control.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ContainerControl" />
[ActorToolbox("GUI")]
public class BlurPanel : ContainerControl
{
/// <summary>

View File

@@ -8,6 +8,7 @@ namespace FlaxEngine.GUI
/// Drop Panel arranges control vertically and provides feature to collapse contents.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ContainerControl" />
[ActorToolbox("GUI")]
public class DropPanel : ContainerControl
{
/// <summary>

View File

@@ -8,6 +8,7 @@ namespace FlaxEngine.GUI
/// A panel that divides up available space between all of its children.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ContainerControl" />
[ActorToolbox("GUI")]
public class GridPanel : ContainerControl
{
private Margin _slotPadding;

View File

@@ -6,6 +6,7 @@ namespace FlaxEngine.GUI
/// This panel arranges child controls horizontally.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.PanelWithMargins" />
[ActorToolbox("GUI")]
public class HorizontalPanel : PanelWithMargins
{
/// <summary>

View File

@@ -8,6 +8,7 @@ namespace FlaxEngine.GUI
/// Panel UI control.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ScrollableControl" />
[ActorToolbox("GUI")]
public class Panel : ScrollableControl
{
private bool _layoutChanged;

View File

@@ -8,6 +8,7 @@ namespace FlaxEngine.GUI
/// Panel that arranges child controls like tiles.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ContainerControl" />
[ActorToolbox("GUI")]
public class TilesPanel : ContainerControl
{
private Margin _tileMargin;

View File

@@ -6,6 +6,7 @@ namespace FlaxEngine.GUI
/// A panel that evenly divides up available space between all of its children.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ContainerControl" />
[ActorToolbox("GUI")]
public class UniformGridPanel : ContainerControl
{
private Margin _slotPadding;

View File

@@ -6,6 +6,7 @@ namespace FlaxEngine.GUI
/// This panel arranges child controls vertically.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.PanelWithMargins" />
[ActorToolbox("GUI")]
public class VerticalPanel : PanelWithMargins
{
/// <summary>