MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / FindLatestInputEvent

Function FindLatestInputEvent

Dependencies/ImGui/src/imgui.cpp:1660–1675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1658#endif
1659
1660static ImGuiInputEvent* FindLatestInputEvent(ImGuiContext* ctx, ImGuiInputEventType type, int arg = -1)
1661{
1662 ImGuiContext& g = *ctx;
1663 for (int n = g.InputEventsQueue.Size - 1; n >= 0; n--)
1664 {
1665 ImGuiInputEvent* e = &g.InputEventsQueue[n];
1666 if (e->Type != type)
1667 continue;
1668 if (type == ImGuiInputEventType_Key && e->Key.Key != arg)
1669 continue;
1670 if (type == ImGuiInputEventType_MouseButton && e->MouseButton.Button != arg)
1671 continue;
1672 return e;
1673 }
1674 return NULL;
1675}
1676
1677// Queue a new key down/up event.
1678// - ImGuiKey key: Translated key (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character)

Callers 5

AddKeyAnalogEventMethod · 0.85
AddMousePosEventMethod · 0.85
AddMouseButtonEventMethod · 0.85
AddMouseViewportEventMethod · 0.85
AddFocusEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected