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

Method SetFocusID

tutorials/common/imgui/imgui.cpp:10324–10346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10322}
10323
10324void ImGui::SetFocusID(ImGuiID id, ImGuiWindow* window)
10325{
10326 ImGuiContext& g = *GImGui;
10327 IM_ASSERT(id != 0);
10328
10329 if (g.NavWindow != window)
10330 SetNavWindow(window);
10331
10332 // Assume that SetFocusID() is called in the context where its window->DC.NavLayerCurrent and g.CurrentFocusScopeId are valid.
10333 // Note that window may be != g.CurrentWindow (e.g. SetFocusID call in InputTextEx for multi-line text)
10334 const ImGuiNavLayer nav_layer = window->DC.NavLayerCurrent;
10335 g.NavId = id;
10336 g.NavLayer = nav_layer;
10337 g.NavFocusScopeId = g.CurrentFocusScopeId;
10338 window->NavLastIds[nav_layer] = id;
10339 if (g.LastItemData.ID == id)
10340 window->NavRectRel[nav_layer] = WindowRectAbsToRel(window, g.LastItemData.NavRect);
10341
10342 if (g.ActiveIdSource == ImGuiInputSource_Nav)
10343 g.NavDisableMouseHover = true;
10344 else
10345 g.NavDisableHighlight = true;
10346}
10347
10348ImGuiDir ImGetDirQuadrantFromDelta(float dx, float dy)
10349{

Callers

nothing calls this directly

Calls 1

WindowRectAbsToRelFunction · 0.85

Tested by

no test coverage detected