Component:GridContainer: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add info
Line 3: Line 3:
|Name=Grid Container
|Name=Grid Container
}}
}}
{{stub}}
The '''GridContainer''' component allows for placing facets in a grid format and storing them under a container.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|EditMode|Bool|
|EditMode|Bool| Whether this grid container is currently being edited (UI edit mode)
|FacetsRoot|Slot|
|FacetsRoot|Slot| Where to put facets when they are placed on the grid.
|_background|'''[[Component:RectTransform|RectTransform]]'''|TypeAdv2=true|
|_background|'''[[Component:RectTransform|RectTransform]]'''|TypeAdv2=true| The UIX rectangle that specifies what the background is.
|_content|'''[[Component:RectTransform|RectTransform]]'''|TypeAdv3=true|
|_content|'''[[Component:RectTransform|RectTransform]]'''|TypeAdv3=true| The UIX rectangle for the content like facets.
|_overlay|'''[[Component:RectTransform|RectTransform]]'''|TypeAdv4=true|
|_overlay|'''[[Component:RectTransform|RectTransform]]'''|TypeAdv4=true| The UIX rectangle for the grid Overlay when editing.
|RecalculateOnSizeChange|Bool|
|RecalculateOnSizeChange|Bool| Whether to recalculate the facets on size change of the canvas.
|CellCount|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Int2|Int2]]>'''|TypeAdv6=true|
|CellCount|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Int2|Int2]]>'''|TypeAdv6=true| The forced cell count of this grid container.
|CellSize|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float2|Float2]]>'''|TypeAdv7=true|
|CellSize|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float2|Float2]]>'''|TypeAdv7=true| How big each cell is in pixels.
|Padding|Float2|
|Padding|Float2| How much padding between facets there should be.
|_lastCalculatedCenteringOffset|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float2|Float2]]>'''|TypeAdv9=true|
|_lastCalculatedCenteringOffset|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float2|Float2]]>'''|TypeAdv9=true| The last centering offset calculated by this component, if at all.
|_lastCalculatedCellSize|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float2|Float2]]>'''|TypeAdv10=true|
|_lastCalculatedCellSize|'''[[Type:Nullable`1|Nullable`1]]&lt;[[Type:Float2|Float2]]&gt;'''|TypeAdv10=true| The last cell size calculated by this component, if at all. Created when <code>CellCount</code> is specified.
|_lastCalculatedPadding|'''[[Type:Nullable`1|Nullable`1]]&lt;[[Type:Float2|Float2]]&gt;'''|TypeAdv11=true|
|_lastCalculatedPadding|'''[[Type:Nullable`1|Nullable`1]]&lt;[[Type:Float2|Float2]]&gt;'''|TypeAdv11=true| The last calculated padding between facets if at all.
}}
}}
== Behavior ==


== Examples ==
== Examples ==
Used in dash screens like the home tab so that facets can be placed on it during edit mode and then saved.


== See Also ==
== See Also ==
* [[Dash Menu]]


[[Category:Components:Radiant UI:Containers{{#translation:}}|Grid Container]]
[[Category:Components:Radiant UI:Containers{{#translation:}}|Grid Container]]
[[Category:Components{{#translation:}}|Grid Container]]
[[Category:Components{{#translation:}}|Grid Container]]
[[Category:ComponentStubs]]

Revision as of 18:46, 20 January 2025

Component image 
Grid Container component as seen in the Scene Inspector

The GridContainer component allows for placing facets in a grid format and storing them under a container.

Fields

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.
EditMode Bool Whether this grid container is currently being edited (UI edit mode)
FacetsRoot Slot Where to put facets when they are placed on the grid.
_background RectTransform The UIX rectangle that specifies what the background is.
_content RectTransform The UIX rectangle for the content like facets.
_overlay RectTransform The UIX rectangle for the grid Overlay when editing.
RecalculateOnSizeChange Bool Whether to recalculate the facets on size change of the canvas.
CellCount Nullable`1<Int2> The forced cell count of this grid container.
CellSize Nullable`1<Float2> How big each cell is in pixels.
Padding Float2 How much padding between facets there should be.
_lastCalculatedCenteringOffset Nullable`1<Float2> The last centering offset calculated by this component, if at all.
_lastCalculatedCellSize Nullable`1<Float2> The last cell size calculated by this component, if at all. Created when CellCount is specified.
_lastCalculatedPadding Nullable`1<Float2> The last calculated padding between facets if at all.

Examples

Used in dash screens like the home tab so that facets can be placed on it during edit mode and then saved.

See Also