| 1658 | #endif |
| 1659 | |
| 1660 | static 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) |
no outgoing calls
no test coverage detected