hud_icon_toolbox¶
Source: base/tealdef/gui/main/hud_icon_toolbox.d.tl
Notes
Recipes for the HUD icons drawn above entities in the 3D view (vehicles with their cargo, stocks, waiting passengers at stations, towns, perk icons, notifications), and the parameter types that custom HUD icon scripts receive.
HudIconToolbox¶
record global base/tealdef/gui/main/hud_icon_toolbox.d.tl:3
global record HudIconToolbox
Load: local hud_icon_toolbox = ug_require "/gui/main/hud_icon_toolbox.tl"
Notes
HUD icon recipes and their parameter types.
Fields
| Name | Type | Description |
|---|---|---|
PerkHudIcon |
Recipe<PerkHudIconParam> |
Recipe that shows a single icon image as HUD icon; used by landmarks, the headquarters and other perk buildings in their hudIconScript. used 9× in the base game |
HudIconMasterBase |
Recipe3<Builtin.HudIconParam, HudIconToolbox.HudIconMasterUserParam, boolean> |
Minimal HUD icon used by layers. It shows the entity's notification icons plus, unless the third parameter is true, the town HUD icon or the engine's default HUD icon. used 11× in the base game |
HudIconMasterGame |
Recipe2<Builtin.HudIconParam, HudIconToolbox.HudIconMasterUserParam> |
The main HUD icon recipe of the game view. used 8× in the base game |
HudIconToolbox.HudIconMasterUserParam¶
interface base/tealdef/gui/main/hud_icon_toolbox.d.tl:5
interface HudIconMasterUserParam
Notes
User parameter passed to HUD icon recipes and to custom hudIconScript functions.
Used in the base game: 12 times in 10 files
base/content/landmarks/landmark_hud.script.tl:11
hudIconFn = function(_captureParams : any, _params : Builtin.HudIconParam, _userParam : HudIconToolbox.HudIconMasterUserParam) : TreeNodeId
base/content/landmarks/hq/hq/headquarter_hud.script.tl:4
hudIconFn = function(_captureParams : any, _params : Builtin.HudIconParam, _userParam : HudIconToolbox.HudIconMasterUserParam) : TreeNodeId
base/content/gui/gui/layers/layer_terrain.tl:41
base/content/gui/gui/layers/layer_passenger_flow.tl:29
base/content/gui/gui/layers/layer_infrastructure.tl:57
base/content/gui/gui/layers/layer_civilization.tl:47
… and 4 more files.
Fields
| Name | Type | Description |
|---|---|---|
selectedEntity |
Engine.Entity |
Currently selected entity; the terminal number of a station is only shown when it is selected. |
hideEmptyVehicles |
boolean |
When true, empty vehicles get no HUD icon; otherwise the default HUD icon is shown for them. |
Functions
accessNotificationCacheFn(Engine.Entity) : {Notification} base/tealdef/gui/main/hud_icon_toolbox.d.tl:6
Notes
Returns the notifications of an entity; when set, notification icons are added in front of the HUD icon.
Returns {Notification}
HudIconToolbox.Happiness¶
record base/tealdef/gui/main/hud_icon_toolbox.d.tl:12
record Happiness
Notes
Waiting passengers at a station group or terminal, shown by the station HUD icon.
Used in the base game: 8 times in 2 files
base/content/gui/gui/layers/layer_public_transport.tl:38
base/content/gui/gui/main/hud_icon_toolbox.tl:112
Fields
| Name | Type | Description |
|---|---|---|
totalWaiting |
integer |
Number of passengers waiting. |
unhappy |
integer |
Number of waiting passengers with bad quality (unhappy). |
HudIconToolbox.PerkHudIconParam¶
record base/tealdef/gui/main/hud_icon_toolbox.d.tl:17
record PerkHudIconParam
Notes
Parameters of PerkHudIcon.
Used in the base game: 4 times in 4 files
base/content/gui/gui/main/hud_icon_toolbox.tl:145
hud_icon_toolbox.PerkHudIcon = react.RegisterRecipe("PerkHudIcon", function(param : HudIconToolbox.PerkHudIconParam) : TreeNodeId
mods/release/urbangames_campaign_mission_03/content/mission/mission/perk_icons_replacement.script.tl:7
local PerkHudIconRepalcement = react.RegisterRecipe("PerkHudIcon", function(param : HudIconToolbox.PerkHudIconParam) : TreeNodeId
mods/release/urbangames_campaign_mission_07/content/mission/mission/perk_icons_replacement.script.tl:7
local PerkHudIconRepalcement = react.RegisterRecipe("PerkHudIcon", function(param : HudIconToolbox.PerkHudIconParam) : TreeNodeId
mods/release/urbangames_campaign_mission_05/content/mission/mission/perk_icons_replacement.script.tl:7
Fields
| Name | Type | Description |
|---|---|---|
path |
string |
Path of the icon image (e.g. a .tga file). |
class |
string |
Style class of the image view (e.g. "landmark"). |