MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ProcessEvent

Function ProcessEvent

engine/Poseidon/Dev/Debug/DebugOverlay.cpp:1724–1747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1722 s_initialized = false;
1723}
1724
1725void 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
1750void NewFrame()

Callers 1

HandleEventsMethod · 0.85

Calls 2

ToggleVisibleFunction · 0.85
DevModeMethod · 0.80

Tested by

no test coverage detected