popover_react_util¶
Source: base/tealdef/gui/main/popover_react_util.d.tl
Notes
Popover windows: small windows that open next to a toggle button and close when the user clicks outside of them or presses back.
PopoverReactUtil¶
record global base/tealdef/gui/main/popover_react_util.d.tl:3
global record PopoverReactUtil
Load: local popover_react_util = ug_require "/gui/main/popover_react_util.tl"
Notes
Popover window recipes.
Fields
| Name | Type | Description |
|---|---|---|
PopoverWindowContent |
Recipe<PopoverWindowParam> |
Content of a popover window; takes focus on mount and calls onClose on a click outside or on IA_MENU_BACK. used 1× in the base game |
PopoverWindow |
Recipe<PopoverWindowParam> |
Non-movable window without close button (style class popover) that shows PopoverWindowContent. used 16× in the base game |
TogglePopoverButton |
Recipe<TogglePopoverButtonParams> |
Icon toggle button that opens and closes a PopoverWindow in the game's window container; only one popover is open at a time. |
PopoverReactUtil.PopoverWindowParam¶
record base/tealdef/gui/main/popover_react_util.d.tl:4
record PopoverWindowParam
Notes
Parameters of PopoverWindow and PopoverWindowContent.
Used in the base game: 2 times in 1 file
base/content/gui/gui/main/popover_react_util.tl:7
Fields
| Name | Type | Description |
|---|---|---|
windowClass |
string |
|
windowTitle |
string |
Title of the window. |
x |
number |
Initial horizontal position of the window. |
y |
number |
Initial vertical position of the window. |
recipe |
IRecipe |
Recipe of the content. |
params |
any |
Parameter passed to recipe. |
compact |
boolean |
Passed to the window's compact option. |
inputActionBubbleUpFilter |
Builtin.Type.InputActionBubbleUpFilter |
Filter for input actions that bubble up from the window. |
Functions
onClose() base/tealdef/gui/main/popover_react_util.d.tl:5
Notes
Called when the popover should close (click outside, IA_MENU_BACK).
PopoverReactUtil.TogglePopoverButtonParams¶
record base/tealdef/gui/main/popover_react_util.d.tl:16
record TogglePopoverButtonParams
Notes
Parameters of TogglePopoverButton.
Used in the base game: 2 times in 2 files
base/content/gui/gui/line_vehicle_mgmt/line_manager_panel.tl:59
base/content/gui/gui/main/popover_react_util.tl:62
Fields
| Name | Type | Description |
|---|---|---|
gameCtx |
GameContext |
Game context; the popover is added to its window container. |
tooltip |
string |
Tooltip of the button, also used as title of the popover window. |
icon |
string |
Icon path of the button. |
extraButtonClass |
string |
|
recipe |
IRecipe |
Recipe of the popover content. |
params |
any |
Parameter passed to recipe. |
compact |
boolean |
Passed to the popover window's compact option. |
windowClass |
string |
Additional style class of the popover window. |
Functions