clarified information and added information to get started with using and understanding the component
(4 intermediate revisions by 4 users not shown)
Line 2:
Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=FixedRectFitterLayoutComponent.png
|Image=FixedRectFitterLayoutComponent.png
Line 9:
Line 8:
<!--T:2-->
<!--T:2-->
== Intoduction ==
The '''FixedRectFitterLayout''' component attempts to fit child elements into the [[Component:RectTransform]] of the FixedRectFitterLayout slot.
To use a FixedRectFitterLayout at least one child element will need an <code>OffsetMax</code> value that is not <code>[0.0; 0.0]</code>.
<!--T:3-->
<!--T:3-->
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|HorizontalAlign|LayoutHorizontalAlignment|
|HorizontalAlign|LayoutHorizontalAlignment|
|VerticalAlign|LayoutVerticalAlignment|
The alignment of the content horizontally.
|Mode|FitMode|
|VerticalAlign|LayoutVerticalAlignment|The alignment of the content vertically.
|AllowShrink|Bool|
|Mode|'''[[#FitMode|FixedRectFitterLayout.FitMode]]'''|TypeAdv2=true|How the child elements should attempt to fit into this [[Component:RectTransform|RectTransform]]
|AllowGrow|Bool|
|AllowShrink|Bool|Should the child elements shrink to fit the space if needed.|AllowGrow|Bool|Should the child elements grow to fill the space if needed.}}
}}
<!--T:4-->
<!--T:4-->
== Behavior ==
== Usage ==
The '''FixedRectFitterLayout''' component computes the bounds of child elements using their computed <code>OffsetMax</code> values and attempts to to fit the child elements into the FixedRectFitterLayout's [[Component:RectTransform]] according to the mode.
Should the child elements grow to fill the space if needed.
Usage
The FixedRectFitterLayout component computes the bounds of child elements using their computed OffsetMax values and attempts to to fit the child elements into the FixedRectFitterLayout's Component:RectTransform according to the mode.