MCPcopy Create free account
hub / github.com/ShenCiao/CialloResearch / FindLatestInputEvent

Function FindLatestInputEvent

imgui/imgui.cpp:1361–1376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1359}
1360
1361static ImGuiInputEvent* FindLatestInputEvent(ImGuiInputEventType type, int arg = -1)
1362{
1363 ImGuiContext& g = *GImGui;
1364 for (int n = g.InputEventsQueue.Size - 1; n >= 0; n--)
1365 {
1366 ImGuiInputEvent* e = &g.InputEventsQueue[n];
1367 if (e->Type != type)
1368 continue;
1369 if (type == ImGuiInputEventType_Key && e->Key.Key != arg)
1370 continue;
1371 if (type == ImGuiInputEventType_MouseButton && e->MouseButton.Button != arg)
1372 continue;
1373 return e;
1374 }
1375 return NULL;
1376}
1377
1378// Queue a new key down/up event.
1379// - 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