Struct Padding
Value-type, never shared between different FlexItems. Differs from CSS3Margins only in that it has no 'AUTO'
optional value
NOTE: this was a side-effect-free class up until v4.0.x added a fully automatic 'detect changes to any data, and
automatically relayout, always 100% correctly' feature; that feature forces the sub-properties of this class to
need to delegate to informing the owning FlexItem "I changed; trigger a relayout!"
Assembly: cs.temp.dll.dll
[Serializable]
public struct Padding : IEnumerable<Length>
Constructors
Creates a set of paddings all in the same mode (pixels or percent or auto .. etc)
Parameters
Sets the top/bottom paddings to one value, and the left/right paddings to another value
Parameters
Fields
Properties
Shorthand for creating a default CSS3 value of 'no padding' (technically: sets them all to '0 pixels')
Methods
Parameters
Returns
Overrides
Returns: top, right, bottom, left
Returns
Parameters
CSSAvailableLength |
containerInnerLength |
|
Returns
Parameters
CSSAvailableLength |
containerSize |
|
Returns
Resolves a value if possible without even calculating the parent-container's size (e.g. if this is a PIXEL
length); if it needs the parent-container's size (e.g. if this is a PERCENT length) it will lazily invoke
the supplied lambda; if that lambda fails to provide a value, this returns null (i.e. unresolvable), otherwise
it gives the final value resolved into pixels.
Parameters
Returns
Sets the top/bottom paddings to one value, and the left/right paddings to another value
Parameters
Parameters
RectTransform.Axis |
axis |
|
CSSAvailableLength |
containerLength |
|
Returns
Parameters
RectTransform.Axis |
axis |
|
CSSAvailableLength |
containerSize |
|
Returns
Parameters
RectTransform.Axis |
axis |
|
Nullable<Vector2> |
containerSize |
|
Returns
- (Single)
ValueOrZero(RectTransform.Axis, ContentLength)
Forces the conversion from ContentLength to go to (float?) rather than (float), which unfortunately C# defaults to
Parameters
Returns
Parameters
RectTransform.Axis |
axis |
|
Nullable<Vector2> |
containerSize |
|
Returns
Parameters
RectTransform.Axis |
axis |
|
Single |
containerLength |
|
Returns
Parameters
RectTransform.Axis |
axis |
|
Vector2 |
containerSize |
|
Returns
Parameters
CSSAvailableLength |
containerInnerLength |
|
Returns
Parameters
CSSAvailableLength |
containerSize |
|
Returns
Operators
Implements