gui_react_util¶
Source: base/tealdef/gui/main/gui_react_util.d.tl
Notes
General React helpers of the game UI: icon/label indicators (the icon with a number used in
HUD icons and entity windows), small layout shortcuts, colour contrast helpers, focus and
input-action wrappers, the emote icon, and usePlugins for rendering the plugins of an
extension point. Load it with ug_require "/gui/main/gui_react_util.tl".
GuiReactUtil¶
record global base/tealdef/gui/main/gui_react_util.d.tl:3
global record GuiReactUtil
Load: local gui_react_util = ug_require "/gui/main/gui_react_util.tl"
Notes
General React helpers (indicators, layout shortcuts, focus scopes, plugin rendering).
Fields
| Name | Type | Description |
|---|---|---|
IconLabelIndicator |
Recipe<IconLabelIndicatorParams> |
Recipe version of makeContentLabelIndictator. Shows an icon with a label, an optional indicator icon and an optional overlay. used 40× in the base game |
FocusNumberInputField |
Recipe<FocusInputFieldParam<number>> |
deprecated, use DoubleSpinBox instead used 1× in the base game |
FocusTextInputField |
Recipe<FocusInputFieldParam<string>> |
deprecated, use TextInputField with "displayOnly" instead used 4× in the base game |
FocusTraversalScope |
Recipe<FocusTraversalScopeParam> |
Returns layout and registers the navigation input actions (IA_NAV_LEFT, IA_NAV_RIGHT, IA_NAV_UP, IA_NAV_DOWN) for it as focus traversal. used 8× in the base game |
InputActionComponent |
Recipe<InputActionComponentParam> |
Returns layout and registers the given input action handlers or forwards for it with react.useInputAction. used 1× in the base game |
EmoteIcon |
Recipe<EmoteIconParam> |
Shows a happy or unhappy face icon, e.g. for passenger happiness or cargo quality. used 6× in the base game |
Clipper |
Recipe<ClipperParam> |
Returns layout with content clipping switched on (react.setClipContent(true)). used 6× in the base game |
Functions
getMouseCursorInteger(mouseCursor : GuiReactUtil.MouseCursor) : integer base/tealdef/gui/main/gui_react_util.d.tl:64
Call as gui_react_util.getMouseCursorInteger
Notes
Converts a MouseCursor name to the integer cursor id.
| Parameter | Type | Description |
|---|---|---|
mouseCursor |
GuiReactUtil.MouseCursor |
Cursor name. nil returns 0 (Default). |
Returns integer: Integer cursor id, e.g. for mouseCursorOverride of a component.
Example
Used in the base game: 42 times in 6 files
base/content/gui/gui/line_vehicle_mgmt/manager_window.tl:254
base/content/gui/gui/line_vehicle_mgmt/manager_hud_util.tl:60
base/content/gui/gui/construction/construction_react_util.tl:1484
base/content/gui/gui/main/game.tl:422
base/content/gui/gui/construction/tools/marketing_campaign_tool.script.tl:54
base/content/gui/gui/construction/tools/industry_greenify_tool.script.tl:46
isHudLabelMode(labelMode : LabelMode) : boolean base/tealdef/gui/main/gui_react_util.d.tl:115
Call as gui_react_util.isHudLabelMode
Notes
Tells whether a label mode is one of the HUD modes.
Returns boolean: true for HudIconMain and HudIconLayer, otherwise false.
makeContentLabelIndictator(params : IconLabelIndicatorParams) : TreeNodeId base/tealdef/gui/main/gui_react_util.d.tl:119
Call as gui_react_util.makeContentLabelIndictator
Notes
Builds an icon/label indicator node, the icon with a number used in HUD icons, cargo lists and entity windows.
Returns TreeNodeId: The indicator node.
Details
The icon is an EmoteIcon if useEmoteWithSatisfaction is set, otherwise one or more
image views from iconPath. The name is spelled Indictator in the game files.
Example
integer2TextLayout(value : integer, tag? : string) : TreeNodeId base/tealdef/gui/main/gui_react_util.d.tl:121
Call as gui_react_util.integer2TextLayout
Notes
Builds a horizontal box with one text view showing value formatted with lang_util.formatInt.
| Parameter | Type | Description |
|---|---|---|
value |
integer |
Number to show. |
tag? |
string |
Value for the text view's meta.tag. |
Returns TreeNodeId: The layout node. The text view is focusable (forceFocusable = true) and uses font-scale-body.
Used in the base game: 4 times in 3 files
base/content/gui/gui/line_vehicle_mgmt/manager_window.tl:3998
base/content/gui/gui/statistics/statistic_lines.tl:229
base/content/gui/gui/statistics/statistic_towns.tl:89
group(TreeNodeId) : TreeNodeId base/tealdef/gui/main/gui_react_util.d.tl:133
Call as gui_react_util.group
Notes
Wraps one node in a horizontal builtin.BoxLayout.
Returns TreeNodeId: The box layout node.
textColorForColor(color : Vec4f) : Vec4f base/tealdef/gui/main/gui_react_util.d.tl:134
Call as gui_react_util.textColorForColor
Notes
Returns a text colour with enough contrast on the given background colour.
Returns Vec4f: The darkest neutral colour of default_colors.gres for bright colours (average of RGB above 0.5), otherwise the lightest neutral colour.
foregroundColorClassForColor(color : Vec4f) : GuiReactUtil.ForegroundContrast base/tealdef/gui/main/gui_react_util.d.tl:135
Call as gui_react_util.foregroundColorClassForColor
Notes
Tells whether dark or light foreground fits on the given colour.
Returns GuiReactUtil.ForegroundContrast: Dark if the average of RGB is above 0.5, otherwise Light.
Details
The line manager maps the result to its own style classes for text on line colours.
stylingHoverClassForColor(color : Vec4f) : GuiReactUtil.ForegroundContrast base/tealdef/gui/main/gui_react_util.d.tl:136
Call as gui_react_util.stylingHoverClassForColor
Notes
Same check as foregroundColorClassForColor, meant for choosing hover style classes.
Returns GuiReactUtil.ForegroundContrast: Dark if the average of RGB is above 0.5, otherwise Light.
makeHorizontalSpacer() : TreeNodeId base/tealdef/gui/main/gui_react_util.d.tl:137
Call as gui_react_util.makeHorizontalSpacer
Notes
Builds an empty component with style class horizontal-spacer.
Returns TreeNodeId
Used in the base game: 121 times in 33 files
base/content/mission/mission/mission_framework/mission_end_window_util.tl:372
base/content/mission/mission/mission_framework/mission_framework_react.tl:353
base/content/gui/gui/map_editor/map_editor.tl:1430
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:990
base/content/gui/gui/line_vehicle_mgmt/line_manager_panel.tl:361
base/content/gui/gui/line_vehicle_mgmt/manager_window.tl:2881
… and 27 more files.
makeVerticalSpacer() : TreeNodeId base/tealdef/gui/main/gui_react_util.d.tl:138
Call as gui_react_util.makeVerticalSpacer
Notes
Builds an empty component with style class vertical-spacer.
Returns TreeNodeId
Used in the base game: 38 times in 16 files
base/content/mission/mission/mission_framework/mission_framework_react.tl:313
base/content/gui/gui/music_player/music_player.tl:213
base/content/gui/gui/map_editor/map_editor.tl:821
base/content/gui/gui/line_vehicle_mgmt/manager_window.tl:3442
base/content/gui/gui/menu/mod_manager_react_util.tl:1644
base/content/gui/gui/menu/mission_page_content.tl:122
… and 10 more files.
makeHorizontalBox({TreeNodeId}) : TreeNodeId base/tealdef/gui/main/gui_react_util.d.tl:139
Call as gui_react_util.makeHorizontalBox
Notes
Builds a horizontal builtin.BoxLayout with the given children.
Returns TreeNodeId
Used in the base game: 73 times in 8 files
base/content/gui/gui/line_vehicle_mgmt/cargofilter_window.tl:203
base/content/gui/gui/menu/mod_manager_react_util.tl:629
base/content/gui/gui/menu/savegame_react_util.tl:366
base/content/gui/gui/menu/mod_selector_page.tl:290
base/content/gui/gui/menu/main_page.tl:28
base/content/gui/gui/menu/paradox_react_util.tl:213
… and 2 more files.
makeVerticalBox({TreeNodeId}) : TreeNodeId base/tealdef/gui/main/gui_react_util.d.tl:140
Call as gui_react_util.makeVerticalBox
Notes
Builds a vertical builtin.BoxLayout with the given children.
Returns TreeNodeId
Used in the base game: 37 times in 7 files
base/content/gui/gui/menu/mod_manager_react_util.tl:607
base/content/gui/gui/menu/load_game_page.tl:196
base/content/gui/gui/menu/save_game_page.tl:282
base/content/gui/gui/menu/new_game_page.tl:206
base/content/gui/gui/menu/paradox_react_util.tl:259
base/content/gui/gui/construction/construction.tl:3273
… and 1 more files.
transformSetUnlessEqual<T>(state : ReactStateT<T>, newValue : T, equals? : (function(T, T) : boolean)) base/tealdef/gui/main/gui_react_util.d.tl:146
Call as gui_react_util.transformSetUnlessEqual
shortcut to state:transform() with an equals call for early-out
| Parameter | Type | Description |
|---|---|---|
state |
ReactStateT<T> |
The react state |
newValue |
T |
The desired value |
equals? |
(function(T, T) : boolean) |
Optional comparison function (defaults to table_util.deepEquals |
usePlugins<ParamType>(ExtensionPoint<ParamType>, detail? : PluginScopeConfig, recipeParam : ParamType) : {TreeNodeId} base/tealdef/gui/main/gui_react_util.d.tl:196
Call as gui_react_util.usePlugins
Notes
Builds the nodes of all plugins registered for an extension point, in their order.
| Parameter | Type | Description |
|---|---|---|
#1 |
ExtensionPoint<ParamType> |
The extension point (registered with react.RegisterExtensionPoint...). |
detail? |
PluginScopeConfig |
Optional refs to the first and last plugin, and fixed nodes to insert. |
recipeParam |
ParamType |
Parameters passed to every plugin recipe. |
Returns {TreeNodeId}: List of plugin nodes, possibly empty.
Details
Call it inside a recipe and place the returned nodes in a layout. Plugins with a
condition function are only built when the condition returns true for the recipe
parameters. Each plugin recipe is called with recipeParam (for extension points with
parameters). With detail.insertHardcoded, fixed nodes of the host recipe are sorted in
between the plugins by their order value.
Example
Used in the base game: 18 times in 17 files
base/content/gui/gui/game_bar/game_bar.tl:54
base/content/gui/gui/game_bar/game_bar_widgets.tl:72
local children : {TreeNodeId} = gui_react_util.usePlugins(game_bar_widgets.GameBarInfoDisplayExtension)
base/content/gui/gui/main/main_mod_button_area.tl:13
base/content/gui/gui/main/game.tl:83
base/content/gui/gui/entity_window/station_group/station_group.tl:864
local pluginWidgets = gui_react_util.usePlugins(station_group_eow.StationGroupEowExtensionPoint, nil, extensionParams)
base/content/gui/gui/entity_window/maintenance_station/maintenance_station.tl:76
… and 11 more files.
usePlugins<WrappedRecipe, ParamType>(WrapperExtensionPoint<WrappedRecipe, ParamType>, detail? : PluginScopeConfig, recipeParam : ParamType) : {TreeNodeId} base/tealdef/gui/main/gui_react_util.d.tl:197
Call as gui_react_util.usePlugins
Notes
Builds the nodes of all plugins registered for an extension point, in their order.
| Parameter | Type | Description |
|---|---|---|
#1 |
WrapperExtensionPoint<WrappedRecipe, ParamType> |
The extension point (registered with react.RegisterExtensionPoint...). |
detail? |
PluginScopeConfig |
Optional refs to the first and last plugin, and fixed nodes to insert. |
recipeParam |
ParamType |
Parameters passed to every plugin recipe. |
Returns {TreeNodeId}: List of plugin nodes, possibly empty.
Details
Call it inside a recipe and place the returned nodes in a layout. Plugins with a
condition function are only built when the condition returns true for the recipe
parameters. Each plugin recipe is called with recipeParam (for extension points with
parameters). With detail.insertHardcoded, fixed nodes of the host recipe are sorted in
between the plugins by their order value.
Example
Used in the base game: 18 times in 17 files
base/content/gui/gui/game_bar/game_bar.tl:54
base/content/gui/gui/game_bar/game_bar_widgets.tl:72
local children : {TreeNodeId} = gui_react_util.usePlugins(game_bar_widgets.GameBarInfoDisplayExtension)
base/content/gui/gui/main/main_mod_button_area.tl:13
base/content/gui/gui/main/game.tl:83
base/content/gui/gui/entity_window/station_group/station_group.tl:864
local pluginWidgets = gui_react_util.usePlugins(station_group_eow.StationGroupEowExtensionPoint, nil, extensionParams)
base/content/gui/gui/entity_window/maintenance_station/maintenance_station.tl:76
… and 11 more files.
usePlugins(ExtensionPoint0, detail? : PluginScopeConfig) : {TreeNodeId} base/tealdef/gui/main/gui_react_util.d.tl:198
Call as gui_react_util.usePlugins
Notes
Builds the nodes of all plugins registered for an extension point, in their order.
| Parameter | Type | Description |
|---|---|---|
#1 |
ExtensionPoint0 |
The extension point (registered with react.RegisterExtensionPoint...). |
detail? |
PluginScopeConfig |
Optional refs to the first and last plugin, and fixed nodes to insert. |
Returns {TreeNodeId}: List of plugin nodes, possibly empty.
Details
Call it inside a recipe and place the returned nodes in a layout. Plugins with a
condition function are only built when the condition returns true for the recipe
parameters. Each plugin recipe is called with recipeParam (for extension points with
parameters). With detail.insertHardcoded, fixed nodes of the host recipe are sorted in
between the plugins by their order value.
Example
Used in the base game: 18 times in 17 files
base/content/gui/gui/game_bar/game_bar.tl:54
base/content/gui/gui/game_bar/game_bar_widgets.tl:72
local children : {TreeNodeId} = gui_react_util.usePlugins(game_bar_widgets.GameBarInfoDisplayExtension)
base/content/gui/gui/main/main_mod_button_area.tl:13
base/content/gui/gui/main/game.tl:83
base/content/gui/gui/entity_window/station_group/station_group.tl:864
local pluginWidgets = gui_react_util.usePlugins(station_group_eow.StationGroupEowExtensionPoint, nil, extensionParams)
base/content/gui/gui/entity_window/maintenance_station/maintenance_station.tl:76
… and 11 more files.
usePlugins<WrappedRecipe>(WrapperExtensionPoint0<WrappedRecipe>, detail? : PluginScopeConfig) : {TreeNodeId} base/tealdef/gui/main/gui_react_util.d.tl:199
Call as gui_react_util.usePlugins
Notes
Builds the nodes of all plugins registered for an extension point, in their order.
| Parameter | Type | Description |
|---|---|---|
#1 |
WrapperExtensionPoint0<WrappedRecipe> |
The extension point (registered with react.RegisterExtensionPoint...). |
detail? |
PluginScopeConfig |
Optional refs to the first and last plugin, and fixed nodes to insert. |
Returns {TreeNodeId}: List of plugin nodes, possibly empty.
Details
Call it inside a recipe and place the returned nodes in a layout. Plugins with a
condition function are only built when the condition returns true for the recipe
parameters. Each plugin recipe is called with recipeParam (for extension points with
parameters). With detail.insertHardcoded, fixed nodes of the host recipe are sorted in
between the plugins by their order value.
Example
Used in the base game: 18 times in 17 files
base/content/gui/gui/game_bar/game_bar.tl:54
base/content/gui/gui/game_bar/game_bar_widgets.tl:72
local children : {TreeNodeId} = gui_react_util.usePlugins(game_bar_widgets.GameBarInfoDisplayExtension)
base/content/gui/gui/main/main_mod_button_area.tl:13
base/content/gui/gui/main/game.tl:83
base/content/gui/gui/entity_window/station_group/station_group.tl:864
local pluginWidgets = gui_react_util.usePlugins(station_group_eow.StationGroupEowExtensionPoint, nil, extensionParams)
base/content/gui/gui/entity_window/maintenance_station/maintenance_station.tl:76
… and 11 more files.
GuiReactUtil.LabelFontColor¶
enum base/tealdef/gui/main/gui_react_util.d.tl:4
enum LabelFontColor
Notes
Colour of the label of an icon/label indicator. Each value maps to a style class.
Details
Style classes: Default none, Warning warning, Error error-tape, Positive
positive, Negative negative, Normal / Inferior / Poor
iconlabelindicator-color-normal / -inferior / -poor. The label mode changes some of
them: in HudIconMain mode Default and Warning use HUD-specific classes, and in
EntityWindow mode Inferior and Poor look like Normal.
Used in the base game: 6 times in 4 files
base/content/gui/gui/layers/layer_public_transport.tl:39
base/content/gui/gui/main/gui_react_util.tl:67
local prepareStyleMapping = function(mode : GuiReactUtil.LabelMode) : {GuiReactUtil.LabelFontColor:string}
base/content/gui/gui/main/hud_icon_toolbox.tl:113
base/content/gui/gui/main/cargo_react_util.tl:159
GuiReactUtil.LabelMode¶
enum base/tealdef/gui/main/gui_react_util.d.tl:20
enum LabelMode
Notes
Where an icon/label indicator is shown. Selects the layout, font size and colour classes.
Details
HudIconMain and HudIconLayer use a compact horizontal HUD layout with style class
hud-icon-main or hud-icon-layer and font font-scale-title-3; the other modes place
the label over the icon and use font-scale-annotation.
Used in the base game: 6 times in 3 files
base/content/gui/gui/main/gui_react_util.tl:52
base/content/gui/gui/main/cargo_react_util.tl:104
local makeCargoTypeIcons = function(params : CargoUtil.CargoTypeInfo, mode : GuiReactUtil.LabelMode, shippingState : GuiReactUtil.ShippingState, showLoadingIndi
base/content/gui/gui/entity_window/vehicle/vehicle_eow.script.tl:851
GuiReactUtil.MouseCursor¶
enum base/tealdef/gui/main/gui_react_util.d.tl:28
enum MouseCursor
Notes
Names of the mouse cursors. Convert them with getMouseCursorInteger where an integer cursor id is expected.
Details
Default to Resize map to 0-4; the game cursors from Invalid on map to 1001-1027
in declaration order.
Used in the base game: 2 times in 1 file
base/content/gui/gui/main/gui_react_util.tl:9
GuiReactUtil.ForegroundContrast¶
enum base/tealdef/gui/main/gui_react_util.d.tl:66
enum ForegroundContrast
Notes
Result of the contrast helpers. Tells whether dark or light foreground fits on a given colour.
Used in the base game: 4 times in 2 files
base/content/gui/gui/line_vehicle_mgmt/manager_hud_util.tl:24
base/content/gui/gui/main/gui_react_util.tl:434
| Value | Description |
|---|---|
"Light" |
Light foreground; returned for dark colours (average of RGB at most 0.5). |
"Dark" |
Dark foreground; returned for bright colours (average of RGB above 0.5). |
GuiReactUtil.ShippingState¶
enum base/tealdef/gui/main/gui_react_util.d.tl:71
enum ShippingState
Notes
Where shown cargo currently is. Adds a style class to an icon/label indicator.
Details
Style classes: warehouse, waiting-passenger, vehicle, industry-input,
industry-output. The base stylesheet uses them in HudIconMain mode to tint the HUD
icon background with the matching ShippingState gameplay colour.
Used in the base game: 8 times in 2 files
base/content/gui/gui/main/gui_react_util.tl:105
base/content/gui/gui/main/cargo_react_util.tl:104
GuiReactUtil.RichLabel¶
record base/tealdef/gui/main/gui_react_util.d.tl:79
record RichLabel
Notes
Label made of a text, an icon or emote, and a second text after the icon. Replaces the plain label of an indicator.
Used in the base game: 2 times in 2 files
base/content/gui/gui/layers/layer_public_transport.tl:48
base/content/gui/gui/main/cargo_react_util.tl:188
Fields
| Name | Type | Description |
|---|---|---|
text |
string |
Text before the icon. |
iconPath |
string |
Image path of the icon between the two texts. |
useEmoteWithSatisfaction |
EmoteIconParam.Satisfaction |
If set, an EmoteIcon with this satisfaction is shown instead of iconPath. Only used in the HUD label modes. |
textAfterIcon |
string |
Text after the icon. |
GuiReactUtil.IconLabelIndicatorParams¶
record base/tealdef/gui/main/gui_react_util.d.tl:86
record IconLabelIndicatorParams
Notes
Parameters of IconLabelIndicator and makeContentLabelIndictator.
Used in the base game: 1 time in 1 file
base/content/gui/gui/main/gui_react_util.tl:330
Fields
| Name | Type | Description |
|---|---|---|
iconPath |
string | {string} |
Image path of the icon, or a list of paths to show several icons side by side. |
useEmoteWithSatisfaction |
EmoteIconParam.Satisfaction |
If set, an EmoteIcon with this satisfaction is used as the icon instead of iconPath. |
label |
string |
Text label, usually a number. Ignored when richLabel is set. |
richLabel |
RichLabel |
Label with text and icon. Takes precedence over label. |
labelFontColor |
LabelFontColor |
Colour of the label (default Default). |
labelMode |
LabelMode |
Layout mode; nil behaves like Default. |
indicatorIconPath |
string |
Image path of a small indicator icon next to the label, e.g. the stock tendency arrows from CargoUtil.getWarehouseCountIndicatorTexture. |
tooltip |
string |
Tooltip of the label and indicator icon. Also used for the icon when iconTooltip is not set. |
iconTooltip |
string | {string} |
Tooltip of the icon, or one tooltip per icon when iconPath is a list. |
overlay |
TreeNodeId |
Node drawn on top of the icon (only in the non-HUD modes). |
indicator |
TreeNodeId |
Node placed above the indicator, e.g. the loading animation of a vehicle. |
shippingState |
ShippingState |
Where the cargo is; adds the matching style class. |
GuiReactUtil.ContentLabelIndicatorParams¶
record base/tealdef/gui/main/gui_react_util.d.tl:101
record ContentLabelIndicatorParams
Notes
Variant of IconLabelIndicatorParams with a ready-made content node instead of an icon path.
Details
The module uses this record internally: makeContentLabelIndictator builds the content
node from the icon parameters and passes the result on in this form. No public function
of the module takes this record.
Fields
| Name | Type | Description |
|---|---|---|
content |
TreeNodeId |
Node shown as the icon. |
label |
string |
Text label. Ignored when richLabel is set. |
richLabel |
RichLabel |
Label with text and icon. |
labelFontColor |
LabelFontColor |
Colour of the label. |
labelMode |
LabelMode |
Layout mode. |
labelExtraContent |
TreeNodeId |
|
indicatorIconPath |
string |
Image path of a small indicator icon next to the label. |
tooltip |
string |
Tooltip of the label and indicator icon. |
overlay |
TreeNodeId |
Node drawn on top of the content. |
indicator |
TreeNodeId |
Node placed above the indicator. |
shippingState |
ShippingState |
Where the cargo is; adds the matching style class. |
GuiReactUtil.FocusInputFieldParam¶
record base/tealdef/gui/main/gui_react_util.d.tl:123
record FocusInputFieldParam<T>
Notes
Parameters of the deprecated FocusNumberInputField and FocusTextInputField recipes.
Used in the base game: 2 times in 1 file
base/content/gui/gui/main/gui_react_util.tl:375
Fields
Functions
onValueChange(value : T) base/tealdef/gui/main/gui_react_util.d.tl:125
Notes
Called with the entered value when it is accepted (also on focus loss).
onCancel() base/tealdef/gui/main/gui_react_util.d.tl:126
Notes
Called when the input is cancelled.
GuiReactUtil.FocusTraversalScopeParam¶
record base/tealdef/gui/main/gui_react_util.d.tl:148
record FocusTraversalScopeParam
Notes
Parameters of the FocusTraversalScope recipe.
Used in the base game: 1 time in 1 file
base/content/gui/gui/main/gui_react_util.tl:457
Fields
| Name | Type | Description |
|---|---|---|
horizontal |
boolean |
true lets the left/right navigation inputs move focus inside layout; false blocks them; nil leaves them to the ancestors. |
vertical |
boolean |
true lets the up/down navigation inputs move focus inside layout; false blocks them; nil leaves them to the ancestors. |
allowBubbleUp |
boolean |
if focus can't be moved further, allow the input action to be handled by ancestors (default: false) |
layout |
TreeNodeId |
Node to show inside the scope. |
GuiReactUtil.InputActionComponentParam¶
record base/tealdef/gui/main/gui_react_util.d.tl:157
record InputActionComponentParam
Notes
Parameters of the InputActionComponent recipe.
Used in the base game: 1 time in 1 file
base/content/gui/gui/main/gui_react_util.tl:475
Fields
| Name | Type | Description |
|---|---|---|
iaOrder |
{string} |
Names of the input actions to register, in this order. |
iaForwards |
{string : React.IaForward} |
Forwards by input action name. Used when iaHandlers has no entry for that action. |
iaHandlers |
{string : React.IaHandler} |
Handlers by input action name. |
layout |
TreeNodeId |
Node to show. |
GuiReactUtil.EmoteIconParam¶
record base/tealdef/gui/main/gui_react_util.d.tl:166
record EmoteIconParam
Notes
Parameters of the EmoteIcon recipe.
Used in the base game: 1 time in 1 file
base/content/gui/gui/main/gui_react_util.tl:486
Fields
| Name | Type | Description |
|---|---|---|
satisfaction |
Satisfaction |
Mood to show. |
tooltip |
string |
Tooltip of the icon. |
forceFocusable |
boolean |
Passed to the image's meta.forceFocusable. |
GuiReactUtil.EmoteIconParam.Satisfaction¶
enum base/tealdef/gui/main/gui_react_util.d.tl:167
enum Satisfaction
Notes
Mood shown by an emote icon.
Used in the base game: 2 times in 2 files
base/content/gui/gui/main/gui_react_util.tl:487
base/content/gui/gui/entity_window/entity_window_util.tl:1451
GuiReactUtil.ClipperParam¶
record base/tealdef/gui/main/gui_react_util.d.tl:179
record ClipperParam
Notes
Parameters of the Clipper recipe.
Used in the base game: 1 time in 1 file
base/content/gui/gui/main/gui_react_util.tl:506
Fields
| Name | Type | Description |
|---|---|---|
layout |
TreeNodeId |
Node whose content is clipped to the component bounds. |
GuiReactUtil.PluginScopeConfig¶
record base/tealdef/gui/main/gui_react_util.d.tl:185
record PluginScopeConfig
Parameter collection for usePlugins()
Used in the base game: 1 time in 1 file
base/content/gui/gui/main/gui_react_util.tl:513
Fields
| Name | Type | Description |
|---|---|---|
firstRef |
ReactRefWrap |
if present, filled with a nodeRef to the first (top) plugin |
lastRef |
ReactRefWrap |
if present, filled with a nodeRef to the last (bottom) plugin |
insertHardcoded |
{integer : {TreeNodeId}} |
insert subtrees that are not plugins ( {order : {tree}} ) |