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

Method SetItemDefaultFocus

KBotExt/imgui/imgui.cpp:7696–7712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7694}
7695
7696void ImGui::SetItemDefaultFocus()
7697{
7698 ImGuiContext& g = *GImGui;
7699 ImGuiWindow* window = g.CurrentWindow;
7700 if (!window->Appearing)
7701 return;
7702 if (g.NavWindow != window->RootWindowForNav || (!g.NavInitRequest && g.NavInitResult.ID == 0) || g.NavLayer != window->DC.NavLayerCurrent)
7703 return;
7704
7705 g.NavInitRequest = false;
7706 NavApplyItemToResult(&g.NavInitResult);
7707 NavUpdateAnyRequestFlag();
7708
7709 // Scroll could be done in NavInitRequestApplyResult() via an opt-in flag (we however don't want regular init requests to scroll)
7710 if (!window->ClipRect.Contains(g.LastItemData.Rect))
7711 ScrollToRectEx(window, g.LastItemData.Rect, ImGuiScrollFlags_None);
7712}
7713
7714void ImGui::SetStateStorage(ImGuiStorage* tree)
7715{

Callers

nothing calls this directly

Calls 1

ContainsMethod · 0.80

Tested by

no test coverage detected