MCPcopy Create free account
hub / github.com/SunOner/sunone_aimbot_2 / FindLatestInputEvent

Function FindLatestInputEvent

sunone_aimbot_2/imgui/imgui.cpp:1816–1831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1814}
1815
1816static ImGuiInputEvent* FindLatestInputEvent(ImGuiContext* ctx, ImGuiInputEventType type, int arg = -1)
1817{
1818 ImGuiContext& g = *ctx;
1819 for (int n = g.InputEventsQueue.Size - 1; n >= 0; n--)
1820 {
1821 ImGuiInputEvent* e = &g.InputEventsQueue[n];
1822 if (e->Type != type)
1823 continue;
1824 if (type == ImGuiInputEventType_Key && e->Key.Key != arg)
1825 continue;
1826 if (type == ImGuiInputEventType_MouseButton && e->MouseButton.Button != arg)
1827 continue;
1828 return e;
1829 }
1830 return NULL;
1831}
1832
1833// Queue a new key down/up event.
1834// - ImGuiKey key: Translated key (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character)

Callers 4

AddKeyAnalogEventMethod · 0.70
AddMousePosEventMethod · 0.70
AddMouseButtonEventMethod · 0.70
AddFocusEventMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected