| 15187 | } |
| 15188 | |
| 15189 | static void NavUpdateWindowingTarget(int focus_change_dir) |
| 15190 | { |
| 15191 | ImGuiContext& g = *GImGui; |
| 15192 | IM_ASSERT(g.NavWindowingTarget); |
| 15193 | if (g.NavWindowingTarget->Flags & ImGuiWindowFlags_Modal) |
| 15194 | return; |
| 15195 | |
| 15196 | const int i_current = ImGui::FindWindowFocusIndex(g.NavWindowingTarget); |
| 15197 | ImGuiWindow* window_target = FindWindowNavFocusable(i_current + focus_change_dir, -INT_MAX, focus_change_dir); |
| 15198 | if (!window_target) |
| 15199 | window_target = FindWindowNavFocusable((focus_change_dir < 0) ? (g.WindowsFocusOrder.Size - 1) : 0, i_current, focus_change_dir); |
| 15200 | if (window_target) // Don't reset windowing target if there's a single window in the list |
| 15201 | { |
| 15202 | g.NavWindowingTarget = g.NavWindowingTargetAnim = window_target; |
| 15203 | g.NavWindowingAccumDeltaPos = g.NavWindowingAccumDeltaSize = ImVec2(0.0f, 0.0f); |
| 15204 | } |
| 15205 | g.NavWindowingToggleLayer = false; |
| 15206 | } |
| 15207 | |
| 15208 | // Apply focus and close overlay |
| 15209 | static void ImGui::NavUpdateWindowingApplyFocus(ImGuiWindow* apply_focus_window) |
no test coverage detected