index / content / gui / main / game_context

Module content.gui.main.game_context🔗

global record CalloutApi
record CalloutParamsT<R is IRecipeParamWithMeta> recipe: Recipe<R> recipeParam: R anchor: Vec2f parent: any gravity: Vec2f getPositionFn: function(): Vec2f recipeParamCompareFn: function(R, R): boolean delay: number end
open: function<R is IRecipeParamWithMeta>(CalloutParamsT<R>) close: function(any) end
global record DialogueOverlayApi isPlaying: function(): boolean getPlayingForTask: function(): string areCreditsPlaying: function(): boolean stopCredits: function(): boolean abortCurrent: function() skipCurrentLine: function() enqueueUnlessExisting: function(string, string, function() : MissionDialogueData.InstructionData) end
global record GameContext
record Filters
record MenuFilter enabledItems: {string} disabledItems: {string} disabledParams: {string} end
record VehicleFilter enabledVehicles: {string} disabledVehicles: {string} end
record ProtectionConfig
record Line stationGroups: {Engine.Entity : boolean} end
line: Line end
menuFilter: MenuFilter vehicleFilter: VehicleFilter protectedEntities: {Engine.Entity : ProtectionConfig | boolean} selectorEntityFilter: {Engine.Entity : boolean} end
rendererComponent: ReactRefWrapApiT<Builtin.RendererComponentParam, Builtin.RenderComponentAPI> windowContainer: ReactRefWrapApiT<Builtin.WindowContainerDelegateParam, Builtin.WindowAPI> toolStack: ReactRefWrapApiT<Builtin.ToolStackParam, Builtin.ToolStackAPI> accessNotificationCacheFn: function(Engine.Entity): {Notification} metroMode: ReactStateT<boolean> preferredLayerConfig: ReactRefT<LayerConfig> dialogueOverlayRef: ReactRefWrapApi0<DialogueOverlayApi> calloutContainerRef: ReactRefWrapApi0<CalloutApi> filters: ReactRefT<Filters> disableFeatures: ReactRefT<{DisableFeatures : boolean}> focusGameBar: function() end
global record GameSpeedApi isEnabled: function(): boolean getSpeed: function(): integer setSpeed: function(integer) togglePause: function() cycleSpeed: function() end

Category: globals🔗

CalloutApi🔗

global record CalloutApi
record CalloutParamsT<R is IRecipeParamWithMeta> recipe: Recipe<R> recipeParam: R anchor: Vec2f parent: any gravity: Vec2f getPositionFn: function(): Vec2f recipeParamCompareFn: function(R, R): boolean delay: number end
open: function<R is IRecipeParamWithMeta>(CalloutParamsT<R>) close: function(any) end

CalloutApi.CalloutParamsT🔗

record CalloutApi.CalloutParamsT<R is IRecipeParamWithMeta> recipe: Recipe<R> recipeParam: R anchor: Vec2f parent: any gravity: Vec2f getPositionFn: function(): Vec2f recipeParamCompareFn: function(R, R): boolean delay: number end
Type Parameters
  • R ( is IRecipeParamWithMeta)

CalloutApi.CalloutParamsT.recipe🔗

CalloutApi.CalloutParamsT.recipe: Recipe<R>

CalloutApi.CalloutParamsT.recipeParam🔗

CalloutApi.CalloutParamsT.recipeParam: R

CalloutApi.CalloutParamsT.anchor🔗

CalloutApi.CalloutParamsT.anchor: Vec2f

CalloutApi.CalloutParamsT.parent🔗

CalloutApi.CalloutParamsT.parent: any

CalloutApi.CalloutParamsT.gravity🔗

CalloutApi.CalloutParamsT.gravity: Vec2f

CalloutApi.CalloutParamsT.getPositionFn🔗

function CalloutApi.CalloutParamsT.getPositionFn(): Vec2f
Returns
  1. Vec2f

CalloutApi.CalloutParamsT.recipeParamCompareFn🔗

function CalloutApi.CalloutParamsT.recipeParamCompareFn(R, R): boolean
Parameters
  • R
  • R
Returns
  1. boolean

CalloutApi.CalloutParamsT.delay🔗

CalloutApi.CalloutParamsT.delay: number

CalloutApi.open🔗

function CalloutApi.open<R is IRecipeParamWithMeta>(CalloutParamsT<R>)
Type Parameters
  • R ( is IRecipeParamWithMeta)
Parameters
  • CalloutParamsT<R>

CalloutApi.close🔗

function CalloutApi.close(any)
Parameters
  • any

DialogueOverlayApi🔗

global record DialogueOverlayApi isPlaying: function(): boolean getPlayingForTask: function(): string areCreditsPlaying: function(): boolean stopCredits: function(): boolean abortCurrent: function() skipCurrentLine: function() enqueueUnlessExisting: function(string, string, function() : MissionDialogueData.InstructionData) end

DialogueOverlayApi.isPlaying🔗

function DialogueOverlayApi.isPlaying(): boolean
Returns
  1. boolean

DialogueOverlayApi.getPlayingForTask🔗

function DialogueOverlayApi.getPlayingForTask(): string
Returns
  1. string

DialogueOverlayApi.areCreditsPlaying🔗

function DialogueOverlayApi.areCreditsPlaying(): boolean
Returns
  1. boolean

DialogueOverlayApi.stopCredits🔗

function DialogueOverlayApi.stopCredits(): boolean
Returns
  1. boolean

DialogueOverlayApi.abortCurrent🔗

function DialogueOverlayApi.abortCurrent()

DialogueOverlayApi.skipCurrentLine🔗

function DialogueOverlayApi.skipCurrentLine()

DialogueOverlayApi.enqueueUnlessExisting🔗

function DialogueOverlayApi.enqueueUnlessExisting(string, string, function() : MissionDialogueData.InstructionData)
Parameters
  • string
  • string
  • function(): MissionDialogueData.InstructionData

GameContext🔗

global record GameContext
record Filters
record MenuFilter enabledItems: {string} disabledItems: {string} disabledParams: {string} end
record VehicleFilter enabledVehicles: {string} disabledVehicles: {string} end
record ProtectionConfig
record Line stationGroups: {Engine.Entity : boolean} end
line: Line end
menuFilter: MenuFilter vehicleFilter: VehicleFilter protectedEntities: {Engine.Entity : ProtectionConfig | boolean} selectorEntityFilter: {Engine.Entity : boolean} end
rendererComponent: ReactRefWrapApiT<Builtin.RendererComponentParam, Builtin.RenderComponentAPI> windowContainer: ReactRefWrapApiT<Builtin.WindowContainerDelegateParam, Builtin.WindowAPI> toolStack: ReactRefWrapApiT<Builtin.ToolStackParam, Builtin.ToolStackAPI> accessNotificationCacheFn: function(Engine.Entity): {Notification} metroMode: ReactStateT<boolean> preferredLayerConfig: ReactRefT<LayerConfig> dialogueOverlayRef: ReactRefWrapApi0<DialogueOverlayApi> calloutContainerRef: ReactRefWrapApi0<CalloutApi> filters: ReactRefT<Filters> disableFeatures: ReactRefT<{DisableFeatures : boolean}> focusGameBar: function() end

GameContext.Filters🔗

record GameContext.Filters
record MenuFilter enabledItems: {string} disabledItems: {string} disabledParams: {string} end
record VehicleFilter enabledVehicles: {string} disabledVehicles: {string} end
record ProtectionConfig
record Line stationGroups: {Engine.Entity : boolean} end
line: Line end
menuFilter: MenuFilter vehicleFilter: VehicleFilter protectedEntities: {Engine.Entity : ProtectionConfig | boolean} selectorEntityFilter: {Engine.Entity : boolean} end

GameContext.Filters.MenuFilter🔗

record GameContext.Filters.MenuFilter enabledItems: {string} disabledItems: {string} disabledParams: {string} end

GameContext.Filters.MenuFilter.enabledItems🔗

GameContext.Filters.MenuFilter.enabledItems: {string}

GameContext.Filters.MenuFilter.disabledItems🔗

GameContext.Filters.MenuFilter.disabledItems: {string}

GameContext.Filters.MenuFilter.disabledParams🔗

GameContext.Filters.MenuFilter.disabledParams: {string}

GameContext.Filters.VehicleFilter🔗

record GameContext.Filters.VehicleFilter enabledVehicles: {string} disabledVehicles: {string} end

GameContext.Filters.VehicleFilter.enabledVehicles🔗

GameContext.Filters.VehicleFilter.enabledVehicles: {string}

GameContext.Filters.VehicleFilter.disabledVehicles🔗

GameContext.Filters.VehicleFilter.disabledVehicles: {string}

GameContext.Filters.ProtectionConfig🔗

record GameContext.Filters.ProtectionConfig
record Line stationGroups: {Engine.Entity : boolean} end
line: Line end

GameContext.Filters.ProtectionConfig.Line🔗

record GameContext.Filters.ProtectionConfig.Line stationGroups: {Engine.Entity : boolean} end

GameContext.Filters.ProtectionConfig.Line.stationGroups🔗

GameContext.Filters.ProtectionConfig.Line.stationGroups: {Engine.Entity : boolean}

GameContext.Filters.ProtectionConfig.line🔗

GameContext.Filters.ProtectionConfig.line: Line

GameContext.Filters.menuFilter🔗

GameContext.Filters.menuFilter: MenuFilter

GameContext.Filters.vehicleFilter🔗

GameContext.Filters.vehicleFilter: VehicleFilter

GameContext.Filters.protectedEntities🔗

GameContext.Filters.protectedEntities: {Engine.Entity : ProtectionConfig | boolean}

GameContext.Filters.selectorEntityFilter🔗

GameContext.Filters.selectorEntityFilter: {Engine.Entity : boolean}

GameContext.rendererComponent🔗

GameContext.rendererComponent: ReactRefWrapApiT<Builtin.RendererComponentParam, Builtin.RenderComponentAPI>

GameContext.windowContainer🔗

GameContext.windowContainer: ReactRefWrapApiT<Builtin.WindowContainerDelegateParam, Builtin.WindowAPI>

GameContext.toolStack🔗

GameContext.toolStack: ReactRefWrapApiT<Builtin.ToolStackParam, Builtin.ToolStackAPI>

GameContext.accessNotificationCacheFn🔗

function GameContext.accessNotificationCacheFn(Engine.Entity): {Notification}
Parameters
  • Engine.Entity
Returns
  1. {Notification}

GameContext.metroMode🔗

GameContext.metroMode: ReactStateT<boolean>

GameContext.preferredLayerConfig🔗

GameContext.preferredLayerConfig: ReactRefT<LayerConfig>

GameContext.dialogueOverlayRef🔗

GameContext.dialogueOverlayRef: ReactRefWrapApi0<DialogueOverlayApi>

GameContext.calloutContainerRef🔗

GameContext.calloutContainerRef: ReactRefWrapApi0<CalloutApi>

GameContext.filters🔗

GameContext.filters: ReactRefT<Filters>

GameContext.disableFeatures🔗

GameContext.disableFeatures: ReactRefT<{DisableFeatures : boolean}>

GameContext.focusGameBar🔗

function GameContext.focusGameBar()

GameSpeedApi🔗

global record GameSpeedApi isEnabled: function(): boolean getSpeed: function(): integer setSpeed: function(integer) togglePause: function() cycleSpeed: function() end

GameSpeedApi.isEnabled🔗

function GameSpeedApi.isEnabled(): boolean
Returns
  1. boolean

GameSpeedApi.getSpeed🔗

function GameSpeedApi.getSpeed(): integer
Returns
  1. integer

GameSpeedApi.setSpeed🔗

function GameSpeedApi.setSpeed(integer)
Parameters
  • integer

GameSpeedApi.togglePause🔗

function GameSpeedApi.togglePause()

GameSpeedApi.cycleSpeed🔗

function GameSpeedApi.cycleSpeed()
Transport Fever 3 Wiki
Gameplay ReferenceComing soon
●
Modding Manual
  • api
  • api.cmd
  • api.engine
  • api.engine.system
  • api.engine.util
  • api.gui
  • api.res
  • api.type
  • api.type.mod
  • api.type.modhub
  • api.type.transformator
  • app
  • main
  • content
    • base
      • difficulty_util
      • model_metadata_util
      • post_run_util
    • climates
      • gen
        • map_gen_util_serialized
    • game_mechanics
      • achievements
        • sound
          • achievement_sfx
      • celebrations
        • celebration_react_util
        • gui
          • sound
            • celebration_sfx
      • company
        • company
        • company_metadata
        • company_progression_util
        • company_react_util
        • company_static_util
        • company_util
        • explorations
          • exploration_plane
        • prospection_metadata
        • sound
          • company_sfx
      • emission
        • emission_config_metadata
        • emission_metadata
        • emissions
      • finance
        • account
        • finances_react_util
        • finances_util
        • loan
        • loan_util
        • sound
          • finance_sfx
      • fun_elements
        • blimp_util
        • custom_entity_util
        • fun_elements
        • rocket_util
        • ufo_util
      • game_time
        • game_time
      • industries
        • industries
      • notifications
        • gui
          • notification_colors
          • sound
            • notification_sfx
        • notification_legacy_util
        • notification_util
        • notifications
        • types
          • notification_react_util
          • notification_types
      • subventions
        • specific_subvention
        • subvention
        • subvention_legacy_util
        • subvention_util
        • subventions_gui
      • towns
        • district_colors
        • sound
          • town_sfx
        • town_cargo
        • town_growth_metadata
        • town_marketing_metadata
        • town_react_util
        • town_util
        • town_util_parallel
        • towns
    • gui
      • construction
        • construction_colors
        • construction_desc_react_util
        • construction_menu
        • construction_react_util
        • sound
          • construction_sfx
        • track_description_metadata
        • track_modifier_metadata
      • context_helper
        • context_helper
      • entity_window
        • animal
          • animal_eow
        • empty_construction
          • empty_construction_eow
        • entity_window_hud
        • entity_window_util
        • eow_extension_util
        • fun_elements
          • fun_elements_eow
        • gameplay_colors
        • industry
          • industry_eow
        • industry_react_util
        • line
          • line_eow
        • maintenance_station
          • maintenance_station_eow
        • perk
          • perk_eow
        • sim_person
          • sim_person_eow
        • station_group
          • station_group_eow
        • town
          • town_eow
        • town_building
          • town_building_eow
        • vehicle
          • vehicle_eow
        • view_manager
        • view_manager_util
        • warehouse
          • warehouse_eow
      • game_bar
        • game_bar
        • game_bar_widgets
      • guidesystem
        • sound
          • guidesystem_sfx
      • hud
        • hud_gui_config
        • hud_react_util
      • layers
        • layer_cargo
        • layer_cargo_flow
        • layer_colors
        • layer_noise
        • layer_pollution
        • layer_public_transport
        • layer_react_util
        • layer_traffic
        • layers_button_ridge
      • line_vehicle_mgmt
        • cargofilter_window
        • feedback_list_util
        • line
        • line_react_util
        • line_util
        • manager_hud_util
        • manager_tooltips_util
        • manager_window
        • sound
          • lvm_sfx
        • vehicle_list_react_util
        • vehicle_react_util
        • vehicle_store
        • vehicle_store_table
        • vehicle_store_util
        • vehicle_store_window
        • vehicle_util
      • main
        • button_react_util
        • callout_react_util
        • cargo_react_util
        • cargo_util
        • collapsible_checkbox_list
        • content_card
        • credits_react_util
        • default_colors
        • disable_features
        • engine_react_util
        • free_cam_options
        • game_context
        • game_react_globals
        • game_tooltips
        • game_windows
        • gui_react_util
        • gui_res_modding
        • hud_icon_toolbox
        • industry_util
        • input_action_colors
        • main_mod_button_area
        • menu_category_util
        • mod_entry_point
        • particle_colors
        • particle_react_util
        • popover_react_util
        • radial_menu_extension
        • script_param_util
        • selection_colors
        • selector
        • selector_react_util
        • styleutil
        • tile_list_react_util
        • tool_react_util
        • town_hud_react_util
      • map_editor
        • map_editor
      • menu
        • dialog_react_util
        • difficulty_react_util
        • graphics_presets_util
        • main_menu
        • map_preview_colors
        • menu_icon_react_util
        • menu_util
        • mod_colors
        • mod_manager_react_util
        • mod_util
        • new_game_react_util
        • paradox_react_util
        • releasenotes_util
        • savegame_react_util
        • sound
          • main_menu_sfx
      • sound
        • gui_comp_sfx
      • statistics
        • statistics
        • statistics_react_util
    • industries
      • industry_productivity_util
      • industry_workers
    • infrastructure
      • traffic_light
        • traffic_light
    • landmarks
      • hq
        • headquarter_util_serialized
      • landmark
      • landmark_util
      • landmark_util_serialized
    • mission
      • arrival_tracker
      • builder_util
      • calendar
      • guide_system
        • guide_system_react
        • guides
          • guide_event
          • guide_generic
          • guide_state
          • guide_timer
          • guide_ui_event
      • mission_boot_util
      • mission_colors
      • mission_framework
        • mission_end_window_util
        • mission_framework_react
        • mission_framework_react_util
        • mission_framework_util
        • mission_framework_util_entity
        • mission_framework_util_line
        • mission_interface
      • mission_pathfinding_util
      • mission_react_util
      • mission_task_util
      • mission_types
      • modifier
      • name_util
      • tasks
        • assign_vehicle
          • mission_task_assign_vehicle
          • mission_task_visit_stations_ordered
        • auto_builder
          • mission_task_electrify
          • mission_task_track_builder
          • prepare_track_building_util
        • build_construction
          • mission_task_build_construction
          • mission_task_build_construction_util
          • mission_task_build_construction_variant
        • build_path
          • mission_task_build_path
        • bulldoze
          • mission_task_auto_bulldoze
          • mission_task_bulldoze
        • buy_vehicle
          • mission_task_buy_vehicle
          • mission_task_clone_vehicle
        • click_and_collect_custom_entity
          • mission_task_collect_entity
          • mission_task_spawn_entity
        • click_entity
          • mission_task_click_entity
        • connect_nodes
          • mission_task_connect_nodes
        • create_line
          • mission_task_create_line
          • mission_task_create_line_for_towns
          • mission_task_stop_config
        • cutscene
          • mission_task_cutscene
        • dialogue
          • mission_task_dialogue
        • finish
          • mission_task_finish
        • guide
          • mission_task_guide
          • mission_task_guide_collect_entity
        • join
          • mission_task_join
        • mission_dialogue_data
        • non_bulldozable
          • mission_task_non_bulldozable
        • observe_entity
          • mission_task_observe_entity
        • page
          • mission_task_page
        • spawn_sims
          • mission_task_spawn_sims
          • sampling_util
        • subsidies
          • mission_task_guide_subsidies
          • mission_task_subsidies
        • task_decorator
        • town_rating
          • mission_task_town_rating
          • mission_task_town_rating_observer
        • town_size
          • mission_task_town_size
        • transfer_ownership
          • mission_task_transfer_ownership
          • transfer_ownership_util
        • transport_cargo
          • mission_task_empty_stocks
          • mission_task_industry_boosted
          • mission_task_transport_cargo
          • mission_task_transport_cargo_faster
          • mission_task_transport_cargo_observer
          • mission_task_transport_passengers
        • utility
          • mission_task_cargo_needs
          • mission_task_check_entities
          • mission_task_check_landmark_level
          • mission_task_clouds
          • mission_task_highlight
          • mission_task_industry_activity
          • mission_task_landmark_requirements
          • mission_task_play_sound
          • mission_task_protected_entities
          • mission_task_relay_update
          • mission_task_send_command
          • mission_task_send_event
          • mission_task_store_any
          • mission_task_substitute_constructions
          • mission_task_time_of_day
          • mission_task_town_development
          • mission_town_util
        • vehicle_util
          • mission_task_replace_vehicles
          • mission_task_sell_vehicles
          • mission_task_start_vehicles
          • mission_task_vehicle_modifier
          • mission_task_vehicle_position
          • mission_vehicle_util
        • wait
          • mission_task_wait
          • mission_task_wait_event
          • mission_task_wait_for
          • mission_task_wait_ui_event
        • waypoints
          • mission_task_waypoints
      • tutorial
        • tasks
          • mission_task_tutorial_init
        • tutorial_story_util
    • scripts
      • app_util
      • audio_util
      • builtin
      • construction
        • asset_util
        • collider_util_serialized
        • construction_config_metadata
        • construction_specialization_metadata
        • construction_util_serialized
        • lane_util_serialized
        • modules_util_serialized
        • param_util
        • street_util_serialized
      • entity_util
      • gamescript
      • journal
      • lang_util
      • log
      • mat4
      • math_util
      • metadata_util
      • polygon_util
      • random_util
      • react
      • soundset
      • string_util
      • table_util
      • tex_util
      • transformator_util
      • util
        • config_util
        • listutil
        • romberg_util
        • town_growth_function
      • vec2
      • vec3
      • vec4
    • stations
      • station_metadata
    • vehicle
      • vehicle_modifier

Generated 19-08-2026

Transport Fever 3 ● Urban Games © 2026