API ReferenceSandbox.UI
public sealed struct Sandbox.UI.Margin
Represents a Rect where each side is the thickness of an edge/padding/margin/border, rather than positions.
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 5 constructors
No results match this filter.
Methods
Showing 3 methods
public Sandbox.UI.Margin EdgeAdd(Sandbox.UI.Margin edges)
Where padding is an edge type rect, will return this rect expanded with those edges.
public Sandbox.UI.Margin EdgeSubtract(Sandbox.UI.Margin edges)
Where padding is an edge type rect, will return this rect expanded with those edges.
public bool IsNearlyZero(double tolerance = 1E-06)
Returns true if margin is practically zero
Parameters
tolerance: Default: 1E-06
No results match this filter.
Properties
Showing 9 properties
public Vector2 Sandbox.UI.Margin.EdgeSize { get; set; }
When the Rect describes edges, this returns the total size of the edges in each direction
public float Sandbox.UI.Margin.Height { get; set; }
Height of the inner square contained within the margin.
public Vector2 Sandbox.UI.Margin.Position { get; set; }
Position of the inner top left corder of the margin/border.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox.UI |
| Type | class |
| Assembly | Sandbox.System |
| Doc ID | T:Sandbox.UI.Margin |