public abstract class Editor.Layout : Editor.QObject
Related Guides
Broader workflow and conceptual references connected to this API.
In the event that you find your JSON files growing too much due to too much data. You can store data as a binary blob. This will work with anything that serializes to JSON.
When creating your own Classes/Structs/Assets/ect, you'll sometimes want custom editors that pair with them. For example, a Gradient Editor so you can visually see what the Gradient looks like instead of editing the Gradient as if it were a Struct with a list of Colours.
You can create your own editor tool to help you create your game. Your tool needs to be created in an editor project.
Editor UI is built entirely out of Widgets. Widgets are different from Panels, which are used for in-game UI. Widgets can be various elements or components, such as labels, buttons, text boxes, trees, or images.
Each camera has a HudPainter that can be used to draw onto the HUD. You do this every frame, in any Update function.
We try to keep as close to standard web styles as possible - but not every property is implemented. We'll use this page to highlight any differences.
Methods
Showing 17 methods
public Editor.Layout AddColumn(int stretch = 0, bool reversed = False)
Parameters
stretch: Default: 0reversed: Default: False
public Editor.Layout AddFlow(int stretch = 0)
Parameters
stretch: Default: 0
public virtual T AddLayout(T layout, int stretch = 0)
Parameters
stretch: Default: 0
public Editor.Layout AddRow(int stretch = 0, bool reversed = False)
Parameters
stretch: Default: 0reversed: Default: False
public virtual void AddSpacingCell(float size)
Add a spacing item
public virtual void AddStretchCell(int stretch = 0)
Add a stretch item
Parameters
stretch: Default: 0
public void Clear(bool deleteWidgets)
Remove all widgets from this layout, without deleting them outright.
Parameters
deleteWidgets: Also delete all the widgets.
public static Editor.Layout Column(bool reversed = False)
Parameters
reversed: Default: False
public static Editor.Layout Flow()
public static Editor.GridLayout Grid()
public static Editor.Layout Row(bool reversed = False)
Parameters
reversed: Default: False
No results match this filter.
Properties
Showing 7 properties
public Sandbox.TextFlag Editor.Layout.Alignment { get; set; }
An enabled layout adjusts dynamically to changes; a disabled layout acts as if it did not exist.
public bool Editor.Layout.Enabled { get; set; }
An enabled layout adjusts dynamically to changes; a disabled layout acts as if it did not exist.
public Sandbox.UI.Margin Editor.Layout.Margin { get; set; }
The amount of space to leave free around the outside of the layout
public Editor.SizeConstraint Editor.Layout.SizeConstraint { get; set; }
How the layout should resize the owning widget
public float Editor.Layout.Spacing { get; set; }
The amount of space between items
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.Layout |