| 1419 | #endif |
| 1420 | |
| 1421 | static ImGuiInputEvent* FindLatestInputEvent(ImGuiContext* ctx, ImGuiInputEventType type, int arg = -1) |
| 1422 | { |
| 1423 | ImGuiContext& g = *ctx; |
| 1424 | for (int n = g.InputEventsQueue.Size - 1; n >= 0; n--) |
| 1425 | { |
| 1426 | ImGuiInputEvent* e = &g.InputEventsQueue[n]; |
| 1427 | if (e->Type != type) |
| 1428 | continue; |
| 1429 | if (type == ImGuiInputEventType_Key && e->Key.Key != arg) |
| 1430 | continue; |
| 1431 | if (type == ImGuiInputEventType_MouseButton && e->MouseButton.Button != arg) |
| 1432 | continue; |
| 1433 | return e; |
| 1434 | } |
| 1435 | return NULL; |
| 1436 | } |
| 1437 | |
| 1438 | // Queue a new key down/up event. |
| 1439 | // - 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