| 1703 | #endif |
| 1704 | |
| 1705 | static 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) |
no outgoing calls
no test coverage detected