FIXME: Perhaps we could clear queued events as well?
| 1293 | |
| 1294 | // FIXME: Perhaps we could clear queued events as well? |
| 1295 | void ImGuiIO::ClearInputKeys() |
| 1296 | { |
| 1297 | #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO |
| 1298 | memset(KeysDown, 0, sizeof(KeysDown)); |
| 1299 | #endif |
| 1300 | for (int n = 0; n < IM_ARRAYSIZE(KeysData); n++) |
| 1301 | { |
| 1302 | KeysData[n].Down = false; |
| 1303 | KeysData[n].DownDuration = -1.0f; |
| 1304 | KeysData[n].DownDurationPrev = -1.0f; |
| 1305 | } |
| 1306 | KeyCtrl = KeyShift = KeyAlt = KeySuper = false; |
| 1307 | KeyMods = ImGuiMod_None; |
| 1308 | MousePos = ImVec2(-FLT_MAX, -FLT_MAX); |
| 1309 | for (int n = 0; n < IM_ARRAYSIZE(MouseDown); n++) |
| 1310 | { |
| 1311 | MouseDown[n] = false; |
| 1312 | MouseDownDuration[n] = MouseDownDurationPrev[n] = -1.0f; |
| 1313 | } |
| 1314 | MouseWheel = MouseWheelH = 0.0f; |
| 1315 | } |
| 1316 | |
| 1317 | static ImGuiInputEvent* FindLatestInputEvent(ImGuiInputEventType type, int arg = -1) |
| 1318 | { |
no test coverage detected