| 1722 | s_initialized = false; |
| 1723 | } |
| 1724 | |
| 1725 | void ProcessEvent(const SDL_Event& event) |
| 1726 | { |
| 1727 | if (!s_initialized) |
| 1728 | return; |
| 1729 | ImGui_ImplSDL3_ProcessEvent(&event); |
| 1730 | |
| 1731 | if (event.type == SDL_EVENT_KEY_DOWN && !event.key.repeat) |
| 1732 | { |
| 1733 | // Ctrl+Grave + F5 are dev-only hotkeys (toggle dev panel + |
| 1734 | // role-slot flicker) gated by --dev. |
| 1735 | if (!AppConfig::Instance().DevMode()) |
| 1736 | return; |
| 1737 | // Ctrl+` (US) / Ctrl+; (CZ) — toggle the dev panel. Bound by physical |
| 1738 | // scancode (GRAVE = the key above Tab) so the same key works regardless |
| 1739 | // of keyboard layout. Ctrl is required so the unmodified key stays |
| 1740 | // available to the game (it's used in radio/chat commands). |
| 1741 | const bool ctrlDown = (event.key.mod & SDL_KMOD_CTRL) != 0; |
| 1742 | if (event.key.scancode == SDL_SCANCODE_GRAVE && ctrlDown) |
| 1743 | { |
| 1744 | ToggleVisible(); |
| 1745 | return; |
| 1746 | } |
| 1747 | } |
| 1748 | } |
| 1749 | |
| 1750 | void NewFrame() |
no test coverage detected