Component:FixedRectFitterLayout: Difference between revisions

From Resonite Wiki
Automated: update Fields
clarified information and added information to get started with using and understanding the component
 
Line 8: Line 8:


<!--T:2-->
<!--T:2-->
The '''FixedRectFitterLayout''' component fits the content in a fixed way, while also giving the [[User|user]] control on how it fits within a [[UIX]] element.
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-->
{{Table ComponentFields
{{Table ComponentFields
|HorizontalAlign|LayoutHorizontalAlignment|Aligns the contents in a horizontal way.
|HorizontalAlign|LayoutHorizontalAlignment|
|VerticalAlign|LayoutVerticalAlignment|Aligns the contents in a vertical way.
The alignment of the content horizontally.
|Mode|'''[[#FitMode|FixedRectFitterLayout.FitMode]]'''|TypeAdv2=true|How this fitter should conform in this [[Component:RectTransform|RectTransform]]
|VerticalAlign|LayoutVerticalAlignment|The alignment of the content vertically.
|AllowShrink|Bool|Should this [[UIX]] element shrink when this [[Slot|slot]]'s contents shrinks.
|Mode|'''[[#FitMode|FixedRectFitterLayout.FitMode]]'''|TypeAdv2=true|How the child elements should attempt to fit into this [[Component:RectTransform|RectTransform]]
|AllowGrow|Bool|Should this [[UIX]] element grow when this [[Slot|slot]]'s contents grows.
|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-->
== Usage ==
== Usage ==
Used when a user needs the contents to be more exact and static. For something a bit more dynamic, it is usually recommended to use a [[Component:ContentSizeFitter|ContentSizeFitter]] component instead.
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-->

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