API ReferenceSandbox.UI
Stylesclass
Represents all supported CSS properties and their currently assigned values.
Constructors1
Showing 1 constructors
public Styles()
No results match this filter.
Methods14
Showing 14 methods
public virtual void Add(Sandbox.UI.BaseStyles bs)
| Parameter | Type | Description |
|---|---|---|
| bs | BaseStyles | — |
Returns:
void—public void ApplyScale(float scale)
| Parameter | Type | Description |
|---|---|---|
| scale | float | — |
Returns:
void—public Matrix BuildTransformMatrix(Vector2 size)
Creates a matrix based on this style's "transform" and other related properties
| Parameter | Type | Description |
|---|---|---|
| size | Vector2 | — |
public virtual void Dirty()
Returns:
void—public virtual void From(Sandbox.UI.BaseStyles bs)
| Parameter | Type | Description |
|---|---|---|
| bs | BaseStyles | — |
Returns:
void—public virtual void FromLerp(Sandbox.UI.BaseStyles from, Sandbox.UI.BaseStyles to, float delta)
| Parameter | Type | Description |
|---|---|---|
| from | BaseStyles | — |
| to | BaseStyles | — |
| delta | float | — |
Returns:
void—public virtual void LerpProperty(string name, Sandbox.UI.BaseStyles from, Sandbox.UI.BaseStyles to, float delta)
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| from | BaseStyles | — |
| to | BaseStyles | — |
| delta | float | — |
Returns:
void—public void ResetAnimation()
Stops the animation. If we have animation vars we'll start again.
Returns:
void—public void StartAnimation(string name, float duration, int iterations = 1, float delay = 0, string timing = linear, string direction = normal, string fillmode = none)
Stop any previous animations and start this one. Make it last this long.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| duration | float | — |
| iterations = 1 | int | — |
| delay = 0 | float | — |
| timing = linear | string | — |
| direction = normal | string | — |
| fillmode = none | string | — |
Returns:
void—No results match this filter.
Properties7
Showing 7 properties
public bool Sandbox.UI.Styles.HasTransitions { get; set; }
Whether this style sheet has any transitions that would need to be run.
Returns:
bool—public bool Sandbox.UI.Styles.IsAnimationActive { get; set; }
True while an animation is set and still running. Becomes false once a finite animation has finished, so the panel can stop re-laying-out every frame for the rest of its life.
Returns:
bool—No results match this filter.