MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ScriptDebugGlobalHotkeys

Method ScriptDebugGlobalHotkeys

src/script/script_gui.cpp:1162–1168  ·  view source on GitHub ↗

* Handler for global hotkeys of the ScriptDebugWindow. * @param hotkey Hotkey * @return ES_HANDLED if hotkey was accepted. */

Source from the content-addressed store, hash-verified

1160 * @return ES_HANDLED if hotkey was accepted.
1161 */
1162 static EventState ScriptDebugGlobalHotkeys(int hotkey)
1163 {
1164 if (_game_mode != GM_NORMAL) return ES_NOT_HANDLED;
1165 Window *w = ShowScriptDebugWindow(CompanyID::Invalid());
1166 if (w == nullptr) return ES_NOT_HANDLED;
1167 return w->OnHotkey(hotkey);
1168 }
1169
1170 static inline HotkeyList hotkeys{"aidebug", {
1171 Hotkey('1', "company_1", WID_SCRD_COMPANY_BUTTON_START),

Callers

nothing calls this directly

Calls 3

ShowScriptDebugWindowFunction · 0.85
InvalidFunction · 0.85
OnHotkeyMethod · 0.45

Tested by

no test coverage detected