MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / GetKeyOwner

Method GetKeyOwner

extern/imgui/imgui.cpp:9217–9231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9215}
9216
9217ImGuiID ImGui::GetKeyOwner(ImGuiKey key)
9218{
9219 if (!IsNamedKeyOrModKey(key))
9220 return ImGuiKeyOwner_None;
9221
9222 ImGuiContext& g = *GImGui;
9223 ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(key);
9224 ImGuiID owner_id = owner_data->OwnerCurr;
9225
9226 if (g.ActiveIdUsingAllKeyboardKeys && owner_id != g.ActiveId && owner_id != ImGuiKeyOwner_Any)
9227 if (key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END)
9228 return ImGuiKeyOwner_None;
9229
9230 return owner_id;
9231}
9232
9233// TestKeyOwner(..., ID) : (owner == None || owner == ID)
9234// TestKeyOwner(..., None) : (owner == None)

Callers

nothing calls this directly

Calls 2

IsNamedKeyOrModKeyFunction · 0.85
GetKeyOwnerDataFunction · 0.85

Tested by

no test coverage detected