Component:FixedRectFitterLayout: Difference between revisions

From Resonite Wiki
imported>Chemicalcrux
Creating the page (with a bot!)
 
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.


<!--T:5-->
<!--T:5-->
Line 30: Line 30:
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:Components{{#translation:}}|FixedRectFitterLayout (Component){{#translation:}}]]
[[Category:Components{{#translation:}}|Fixed Rect Fitter Layout]]
[[Category:ComponentStubs]]
[[Category:Components With Nested Enums{{#translation:}}|Fixed Rect Fitter Layout]]
[[Category:Components:UIX:Layout{{#translation:}}|FixedRectFitterLayout (Component){{#translation:}}]]
[[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].

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
HorizontalAlign LayoutHorizontalAlignment The alignment of the content horizontally.
VerticalAlign LayoutVerticalAlignment The alignment of the content vertically.
Mode FixedRectFitterLayout.FitMode How the child elements should attempt to fit into this RectTransform
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.

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.

Examples

Related Components