app_util¶
Source: base/tealdef/scripts/app_util.d.tl
Notes
Types of /scripts/app_util.tl (AppUtil) for choosing between mouse and gamepad behaviour.
AppUtil¶
record global base/tealdef/scripts/app_util.d.tl:3
global record AppUtil
Load: local app_util = ug_require "::/scripts/app_util.tl" as AppUtil
Notes
Input-mode helpers returned by ug_require "/scripts/app_util.tl".
Functions
isGamepadInputMode() : boolean base/tealdef/scripts/app_util.d.tl:4
Call as app_util.isGamepadInputMode(…)
Notes
True if the game is currently in gamepad input mode.
Returns boolean
Used in the base game: 36 times in 13 files
base/content/game_mechanics/game_mechanics/emission/pollution_cleanup_facility_hud.script.tl:105
base/content/gui/gui/entity_window/double_slip_switch.tl:16
base/content/gui/gui/entity_window/industry/industry.tl:391
base/content/gui/gui/entity_window/industry/industry_eow.script.tl:221
base/content/gui/gui/entity_window/line/line_eow.script.tl:153
base/content/gui/gui/entity_window/maintenance_station/maintenance_station_eow.script.tl:23
… and 7 more files.
getMouseOrGamepad<MouseType, GamepadTypeT>(mouse : MouseType, gamepad : GamepadTypeT) : MouseType | GamepadTypeT base/tealdef/scripts/app_util.d.tl:5
Call as app_util.getMouseOrGamepad(…)
Notes
Returns gamepad in gamepad input mode, otherwise mouse.
Returns MouseType | GamepadTypeT
Used in the base game: 31 times in 16 files
base/content/gui/gui/context_helper/context_helper_react.tl:299
text = app_util.getMouseOrGamepad(_("HELP_CONSTRUCTION_GENERATOR_STREETS"), _("HELP_CONSTRUCTION_GENERATOR_STREETS_CONTROLLER")),
base/content/gui/gui/entity_window/town_building/town_building.tl:481
base/content/gui/gui/layers/layer_cargo.tl:298
base/content/gui/gui/layers/layer_cargo_flow.tl:331
base/content/gui/gui/layers/layer_civilization.tl:97
base/content/gui/gui/layers/layer_infrastructure.tl:179
… and 10 more files.