clarified information and added information to get started with using and understanding the component
(2 intermediate revisions by 2 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|FitMode]]'''|TypeAdv2=true|
|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.
<!--T:5-->
<!--T:5-->
Line 31:
Line 31:
</translate>
</translate>
[[Category:Components{{#translation:}}|Fixed Rect Fitter Layout]]
[[Category:Components{{#translation:}}|Fixed Rect Fitter Layout]]
[[Category:ComponentStubs]]
[[Category:Components With Nested Enums{{#translation:}}|Fixed Rect Fitter Layout]]
[[Category:Components With Nested Enums{{#translation:}}|Fixed Rect Fitter Layout]]
[[Category:Components:UIX:Layout{{#translation:}}|Fixed Rect Fitter Layout]]
[[Category:Components:UIX:Layout{{#translation:}}|Fixed Rect Fitter Layout]]
Latest revision as of 19:14, 4 April 2025
Component image
FixedRectFitterLayout component as seen in the Scene Inspector
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 OffsetMax value that is not [0.0; 0.0].
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.