* Handler for global hotkeys of the ScriptDebugWindow. * @param hotkey Hotkey * @return ES_HANDLED if hotkey was accepted. */
| 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), |
nothing calls this directly
no test coverage detected