Skip to content

game_react_globals

Source: base/tealdef/gui/main/game_react_globals.d.tl

Notes

Global access to the main parts of the in-game GUI for code that has no GameContext, loaded with ug_require "/gui/main/game_react_globals.tl".

GameReactGlobals

record global base/tealdef/gui/main/game_react_globals.d.tl:3

global record GameReactGlobals

Load: local game_react_globals = ug_require "::/gui/main/game_react_globals.tl"

Notes

Functions returning the in-game renderer component, window container, tool stack and disabled features.

Details

The values exist only after the in-game GUI root (GameUIRoot) has been created.

Functions

getDefaultRendererComponent() : ReactRefWrapApiT<Builtin.RendererComponentParam, Builtin.RenderComponentAPI> base/tealdef/gui/main/game_react_globals.d.tl:4

Call as game_react_globals.getDefaultRendererComponent

Notes

Returns the reference to the main 3D view (same as GameContext.rendererComponent).

Returns ReactRefWrapApiT<Builtin.RendererComponentParam, Builtin.RenderComponentAPI>

getDefaultWindowContainer() : ReactRefWrapApiT<Builtin.WindowContainerDelegateParam, Builtin.WindowAPI> base/tealdef/gui/main/game_react_globals.d.tl:5

Call as game_react_globals.getDefaultWindowContainer

Notes

Returns the reference to the in-game window container (same as GameContext.windowContainer).

Returns ReactRefWrapApiT<Builtin.WindowContainerDelegateParam, Builtin.WindowAPI>

getDefaultToolStack() : ReactRefWrapApiT<Builtin.ToolStackParam, Builtin.ToolStackAPI> base/tealdef/gui/main/game_react_globals.d.tl:6

Call as game_react_globals.getDefaultToolStack

Notes

Returns the reference to the in-game tool stack (same as GameContext.toolStack).

Returns ReactRefWrapApiT<Builtin.ToolStackParam, Builtin.ToolStackAPI>

getDefaultWindowApi() : Builtin.WindowAPI base/tealdef/gui/main/game_react_globals.d.tl:7

Call as game_react_globals.getDefaultWindowApi

Notes

Returns the window API of the in-game window container.

Returns Builtin.WindowAPI: The Builtin.WindowAPI, or nil if the container does not exist (any more).

getDefaultToolStackApi() : Builtin.ToolStackAPI base/tealdef/gui/main/game_react_globals.d.tl:8

Call as game_react_globals.getDefaultToolStackApi

Notes

Returns the API of the in-game tool stack.

Returns Builtin.ToolStackAPI: The Builtin.ToolStackAPI, or nil if the tool stack does not exist (any more).

getDisableFeatures() : {DisableFeatures : boolean} base/tealdef/gui/main/game_react_globals.d.tl:9

Call as game_react_globals.getDisableFeatures

Notes

Returns the set of currently disabled features (the value of GameContext.disableFeatures).

Returns {DisableFeatures : boolean}

Used in the base game: 4 times in 4 files

mods/release/urbangames_campaign_mission_03/content/mission/mission/perk_icons_replacement.script.tl:8

if game_react_globals.getDisableFeatures()["PerkHudIcons"] then
mods/release/urbangames_campaign_mission_07/content/mission/mission/perk_icons_replacement.script.tl:8
if game_react_globals.getDisableFeatures()["PerkHudIcons"] then
mods/release/urbangames_campaign_mission_01/content/mission/mission/hud_replacement.script.tl:7
if game_react_globals.getDisableFeatures()["HudIconMaster"] then
mods/release/urbangames_campaign_mission_05/content/mission/mission/perk_icons_replacement.script.tl:8
if game_react_globals.getDisableFeatures()["PerkHudIcons"] then