| 7731 | } |
| 7732 | |
| 7733 | void ImGui::SetItemDefaultFocus() |
| 7734 | { |
| 7735 | ImGuiContext& g = *GImGui; |
| 7736 | ImGuiWindow* window = g.CurrentWindow; |
| 7737 | if (!window->Appearing) |
| 7738 | return; |
| 7739 | if (g.NavWindow != window->RootWindowForNav || (!g.NavInitRequest && g.NavInitResultId == 0) || g.NavLayer != window->DC.NavLayerCurrent) |
| 7740 | return; |
| 7741 | |
| 7742 | g.NavInitRequest = false; |
| 7743 | g.NavInitResultId = g.LastItemData.ID; |
| 7744 | g.NavInitResultRectRel = WindowRectAbsToRel(window, g.LastItemData.Rect); |
| 7745 | NavUpdateAnyRequestFlag(); |
| 7746 | |
| 7747 | // Scroll could be done in NavInitRequestApplyResult() via an opt-in flag (we however don't want regular init requests to scroll) |
| 7748 | if (!IsItemVisible()) |
| 7749 | ScrollToRectEx(window, g.LastItemData.Rect, ImGuiScrollFlags_None); |
| 7750 | } |
| 7751 | |
| 7752 | void ImGui::SetStateStorage(ImGuiStorage* tree) |
| 7753 | { |
nothing calls this directly
no test coverage detected