API ReferenceSandbox.UI
Marginclass
Represents a Rect where each side is the thickness of an edge/padding/margin/border, rather than positions.
object→Margin
Constructors5
Showing 5 constructors
No results match this filter.
Methods3
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.
| Parameter | Type | Description |
|---|---|---|
| edges | Margin | — |
public Sandbox.UI.Margin EdgeSubtract(Sandbox.UI.Margin edges)
Where padding is an edge type rect, will return this rect contracted by those edges. The inverse of `Sandbox.UI.Margin.EdgeAdd(Sandbox.UI.Margin)`.
| Parameter | Type | Description |
|---|---|---|
| edges | Margin | — |
public bool IsNearlyZero(double tolerance = 1E-06)
Returns true if margin is practically zero
| Parameter | Type | Description |
|---|---|---|
| tolerance = 1E-06 | double | — |
Returns:
bool—No results match this filter.
Properties9
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.
Returns:
float—public Vector2 Sandbox.UI.Margin.Position { get; set; }
Position of the inner top left corder of the margin/border.
No results match this filter.