Parent Class: GenericElementsManager
This class has the logic of grid with columns and rows.
On This Page
Class Properties
- mCurrentSelectedColumnIndex: This integer define the current element selected in column axis.
- mCurrentSelectedRowIndex: This integer define the current element selected in row axis.
- mCircularLogic: If true specify that the behaviour of the selected element will be that the next (or previous) element when an edge of the grid is reached is specified by the property mCircularLogicType.
- mCircularLogicType:
- One Dimension: When at the edge of a row the next or previous element will be at the opposite edge of the same row.
- Two Dimensions: When at the edge of a row the next element will be at the opposite edge of the next row and, the previous element will be at the opposite edge of the previous row.
Initial Setup
To use the generic grid just open up the widget where you want to use it and type Generic Grid in the Palette section

drag and drop it into your Widget Hierarchy to use it

It requires an Elements Panel to work as you see in the screenshot below

take a Grid Panel

drag and drop over the text mElementsPanel

the setup for the Generic Grid is finished, now you need to add Elements to the grid
Add Elements To Grid
There are two ways of adding UI Elements to the grid, the first way is from the Designer editor and the other from the Graph Editor (code)
Remember that only UI Elements inherited from WBP_GenericInputHandler are considered, so for example the screenshot below, WBP_BasicButton inherit from WBP_GenericButton which inherit from WBP_GenericElement which inherit from WBP_GenericInputHandler.
Designer Editor
To add UI Elements from the Designer Editor just pick your Element from the Palette, drag and drop it inside the chosen Elements Panel in this case the Grid Panel.

Graph Editor
To add Elements from the Graph Editor you first need to create the Element itself, to do that use the node Create Widget

choose the class that you want, in this case WBP_BasicButton, set all the parameters the way you want

then you can choose to add the element either in Append, meaning that will be the last of the list

or you can Add the Element in a specific index, in the screenshot below the 0th index is chosen, meaning that will be the first element of the list

or you can Add the Element in a specific coordinate (specific row and specific column) of the grid
