MCPcopy Create free account
hub / github.com/cinder/Cinder / ClearInputMouse

Method ClearInputMouse

src/imgui/imgui.cpp:1678–1694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1676}
1677
1678void ImGuiIO::ClearInputMouse()
1679{
1680 for (ImGuiKey key = ImGuiKey_Mouse_BEGIN; key < ImGuiKey_Mouse_END; key = (ImGuiKey)(key + 1))
1681 {
1682 ImGuiKeyData* key_data = &KeysData[key - ImGuiKey_NamedKey_BEGIN];
1683 key_data->Down = false;
1684 key_data->DownDuration = -1.0f;
1685 key_data->DownDurationPrev = -1.0f;
1686 }
1687 MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
1688 for (int n = 0; n < IM_ARRAYSIZE(MouseDown); n++)
1689 {
1690 MouseDown[n] = false;
1691 MouseDownDuration[n] = MouseDownDurationPrev[n] = -1.0f;
1692 }
1693 MouseWheel = MouseWheelH = 0.0f;
1694}
1695
1696// Removed this as it is ambiguous/misleading and generally incorrect to use with the existence of a higher-level input queue.
1697// Current frame character buffer is now also cleared by ClearInputKeys().

Callers 1

UpdateInputEventsMethod · 0.80

Calls 1

ImVec2Function · 0.85

Tested by

no test coverage detected