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

Function FindLatestInputEvent

src/imgui/imgui.cpp:1705–1720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1703#endif
1704
1705static ImGuiInputEvent* FindLatestInputEvent(ImGuiContext* ctx, ImGuiInputEventType type, int arg = -1)
1706{
1707 ImGuiContext& g = *ctx;
1708 for (int n = g.InputEventsQueue.Size - 1; n >= 0; n--)
1709 {
1710 ImGuiInputEvent* e = &g.InputEventsQueue[n];
1711 if (e->Type != type)
1712 continue;
1713 if (type == ImGuiInputEventType_Key && e->Key.Key != arg)
1714 continue;
1715 if (type == ImGuiInputEventType_MouseButton && e->MouseButton.Button != arg)
1716 continue;
1717 return e;
1718 }
1719 return NULL;
1720}
1721
1722// Queue a new key down/up event.
1723// - ImGuiKey key: Translated key (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character)

Callers 4

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

Calls

no outgoing calls

Tested by

no test coverage detected