MCPcopy Create free account
hub / github.com/RenderKit/embree / GetKeyOwner

Method GetKeyOwner

tutorials/common/imgui/imgui.cpp:8546–8560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8544}
8545
8546ImGuiID ImGui::GetKeyOwner(ImGuiKey key)
8547{
8548 if (!IsNamedKeyOrModKey(key))
8549 return ImGuiKeyOwner_None;
8550
8551 ImGuiContext& g = *GImGui;
8552 ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(key);
8553 ImGuiID owner_id = owner_data->OwnerCurr;
8554
8555 if (g.ActiveIdUsingAllKeyboardKeys && owner_id != g.ActiveId && owner_id != ImGuiKeyOwner_Any)
8556 if (key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END)
8557 return ImGuiKeyOwner_None;
8558
8559 return owner_id;
8560}
8561
8562// TestKeyOwner(..., ID) : (owner == None || owner == ID)
8563// TestKeyOwner(..., None) : (owner == None)

Callers

nothing calls this directly

Calls 2

IsNamedKeyOrModKeyFunction · 0.85
GetKeyOwnerDataFunction · 0.85

Tested by

no test coverage detected