tile_list_react_util¶
Source: base/tealdef/gui/main/tile_list_react_util.d.tl
Notes
Tile lists: grids of tiles with an image, a title, info icons and buttons, as used for save games and mods in the main menu.
TileListReactUtil¶
record global base/tealdef/gui/main/tile_list_react_util.d.tl:3
global record TileListReactUtil
Load: local tile_list_react_util = ug_require "/gui/main/tile_list_react_util.tl"
Notes
Tile grid and tile recipes.
Fields
| Name | Type | Description |
|---|---|---|
TileList |
Recipe<TileListParams> |
Arranges tiles in rows of numCols. used 4× in the base game |
TileElement |
Recipe<TileElementParams> |
A tile with title, image, info row and buttons; IA_CONTEXT_HELP clicks the details button. used 2× in the base game |
TileListReactUtil.TileListParams¶
record base/tealdef/gui/main/tile_list_react_util.d.tl:4
record TileListParams
Notes
Parameters of TileList.
Used in the base game: 1 time in 1 file
base/content/gui/gui/main/tile_list_react_util.tl:8
Fields
| Name | Type | Description |
|---|---|---|
elements |
{TreeNodeId} |
The tiles, filled row by row. |
numCols |
integer |
Number of tiles per row. |
numRows |
integer |
Minimum number of rows (empty rows are added when there are fewer tiles). |
TileListReactUtil.TileElementParams¶
record base/tealdef/gui/main/tile_list_react_util.d.tl:11
record TileElementParams
Notes
Parameters of TileElement.
Used in the base game: 1 time in 1 file
base/content/gui/gui/main/tile_list_react_util.tl:35
Fields
| Name | Type | Description |
|---|---|---|
title |
string |
Title of the tile. |
tileTooltip |
string |
Tooltip of the whole tile. |
infoIcons |
{InfoIconParams} |
Entries of the info row. |
detailsAsPrimaryButton |
boolean |
Styles the details (gear) button as primary button (mouse mode only). |
calloutContainerRef |
ReactRefWrapApi0<CalloutApi> |
Callout container for the callout of a critical info entry. |
Functions
onClickMain() base/tealdef/gui/main/tile_list_react_util.d.tl:29
optional
onClickDetails() base/tealdef/gui/main/tile_list_react_util.d.tl:30
optional
onDoubleClickMain() base/tealdef/gui/main/tile_list_react_util.d.tl:31
optional
createImage() : TreeNodeId base/tealdef/gui/main/tile_list_react_util.d.tl:33
Notes
Builds the image of the tile.
Returns TreeNodeId
createButtons() : {TreeNodeId}, function() base/tealdef/gui/main/tile_list_react_util.d.tl:34
Notes
Builds the buttons of the tile; a details (gear) button is appended when there is at least one.
Returns {TreeNodeId}, function(): The buttons and an optional click handler used when onClickMain or onClickDetails is not set.
TileListReactUtil.TileElementParams.InfoIconParams¶
record base/tealdef/gui/main/tile_list_react_util.d.tl:12
record InfoIconParams
Notes
An icon with a label in the info row of a tile.
Used in the base game: 2 times in 2 files
base/content/gui/gui/menu/mod_manager_react_util.tl:348
base/content/gui/gui/menu/savegame_react_util.tl:383
Fields