MCPcopy Create free account
hub / github.com/RenderKit/embree / ClearInputKeys

Method ClearInputKeys

tutorials/common/imgui/imgui.cpp:1295–1315  ·  view source on GitHub ↗

FIXME: Perhaps we could clear queued events as well?

Source from the content-addressed store, hash-verified

1293
1294// FIXME: Perhaps we could clear queued events as well?
1295void 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
1317static ImGuiInputEvent* FindLatestInputEvent(ImGuiInputEventType type, int arg = -1)
1318{

Callers 1

UpdateInputEventsMethod · 0.80

Calls 1

ImVec2Function · 0.85

Tested by

no test coverage detected