| 1400 | #endif |
| 1401 | |
| 1402 | static ImGuiInputEvent* FindLatestInputEvent(ImGuiContext* ctx, ImGuiInputEventType type, int arg = -1) |
| 1403 | { |
| 1404 | ImGuiContext& g = *ctx; |
| 1405 | for (int n = g.InputEventsQueue.Size - 1; n >= 0; n--) |
| 1406 | { |
| 1407 | ImGuiInputEvent* e = &g.InputEventsQueue[n]; |
| 1408 | if (e->Type != type) |
| 1409 | continue; |
| 1410 | if (type == ImGuiInputEventType_Key && e->Key.Key != arg) |
| 1411 | continue; |
| 1412 | if (type == ImGuiInputEventType_MouseButton && e->MouseButton.Button != arg) |
| 1413 | continue; |
| 1414 | return e; |
| 1415 | } |
| 1416 | return NULL; |
| 1417 | } |
| 1418 | |
| 1419 | // Queue a new key down/up event. |
| 1420 | // - ImGuiKey key: Translated key (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character) |
no outgoing calls
no test coverage detected