-
Notifications
You must be signed in to change notification settings - Fork 0
BoxContainer
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.BoxContainer |
| Namespace | Electron2D |
| Kind | class |
| Category | UI and Text |
Arranges direct child controls in a single horizontal or vertical line.
public class Electron2D.BoxContainer : Electron2D.ContainerProfile: Electron2D 0.1.0 2D
Status: Supported / Parity verified
Out of profile: no
Godot reference: BoxContainer
Single-axis UI container with separation, alignment, expand/fill size flags and spacer creation.
BoxContainer is the shared implementation behind
Electron2D.HBoxContainer and Electron2D.VBoxContainer. It measures
child minimum sizes, applies the separation theme constant and
distributes extra space to children whose size flags expand on the main
axis.
This type is not synchronized. Create and mutate it on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.ContainerElectron2D.HBoxContainerElectron2D.VBoxContainer
| Member | Kind | Summary |
|---|---|---|
Alignment |
Property | Gets or sets how non-expanded children are aligned along the box axis. |
Vertical |
Property | Gets or sets whether this box lays out children vertically. |
Electron2D.BoxContainer() |
Constructor | Initializes a new instance of the Electron2D.BoxContainer type. |
AddSpacer(System.Boolean) |
Method | Adds a spacer control at the beginning or end of this box. |
_GetMinimumSize() |
Method | Gets the minimum size required by this box container. |
Kind: Property
public Electron2D.BoxContainerAlignmentMode Alignment { get; set; }Gets or sets how non-expanded children are aligned along the box axis.
Alignment only affects free space that was not consumed by expanded children.
The current Electron2D.BoxContainerAlignmentMode. The default is
Electron2D.BoxContainerAlignmentMode.Begin.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.BoxContainerAlignmentMode
Kind: Property
public System.Boolean Vertical { get; set; }Gets or sets whether this box lays out children vertically.
Specialized Electron2D.HBoxContainer and Electron2D.VBoxContainer
types set this value in their constructors.
true for vertical layout; false for horizontal layout.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.HBoxContainerElectron2D.VBoxContainer
Kind: Constructor
public Electron2D.BoxContainer()Initializes a new instance of the Electron2D.BoxContainer type.
The new container uses horizontal layout until Electron2D.BoxContainer.Vertical is
set to true.
This constructor is not synchronized. Call it on the main scene thread.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.BoxContainer.Vertical
Kind: Method
public Electron2D.Control AddSpacer(System.Boolean)(System.Boolean begin)Adds a spacer control at the beginning or end of this box.
The spacer expands and fills on the main axis. It is a normal
Electron2D.Control child and can be removed or moved by regular node
hierarchy APIs.
-
begin:trueto place the spacer before existing children;falseto place it after existing children.
The created spacer control.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Node.AddChild(Electron2D.Node)Electron2D.Node.MoveChild(Electron2D.Node,System.Int32)
Kind: Method
public Electron2D.Vector2 _GetMinimumSize()()Gets the minimum size required by this box container.
The main axis sums child minimum sizes. The cross axis uses the largest child minimum size.
The minimum size produced by direct visible child controls and separation.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetMinimumSize
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.