MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / GetKeyOwner

Method GetKeyOwner

KBotExt/imgui/imgui.cpp:8974–8988  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8972}
8973
8974ImGuiID ImGui::GetKeyOwner(ImGuiKey key)
8975{
8976 if (!IsNamedKeyOrModKey(key))
8977 return ImGuiKeyOwner_None;
8978
8979 ImGuiContext& g = *GImGui;
8980 ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(&g, key);
8981 ImGuiID owner_id = owner_data->OwnerCurr;
8982
8983 if (g.ActiveIdUsingAllKeyboardKeys && owner_id != g.ActiveId && owner_id != ImGuiKeyOwner_Any)
8984 if (key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END)
8985 return ImGuiKeyOwner_None;
8986
8987 return owner_id;
8988}
8989
8990// TestKeyOwner(..., ID) : (owner == None || owner == ID)
8991// TestKeyOwner(..., None) : (owner == None)

Callers

nothing calls this directly

Calls 2

IsNamedKeyOrModKeyFunction · 0.85
GetKeyOwnerDataFunction · 0.85

Tested by

no test coverage detected