| 14492 | } |
| 14493 | |
| 14494 | static void NavUpdateWindowingTarget(int focus_change_dir) |
| 14495 | { |
| 14496 | ImGuiContext& g = *GImGui; |
| 14497 | IM_ASSERT(g.NavWindowingTarget); |
| 14498 | if (g.NavWindowingTarget->Flags & ImGuiWindowFlags_Modal) |
| 14499 | return; |
| 14500 | |
| 14501 | const int i_current = ImGui::FindWindowFocusIndex(g.NavWindowingTarget); |
| 14502 | ImGuiWindow* window_target = FindWindowNavFocusable(i_current + focus_change_dir, -INT_MAX, focus_change_dir); |
| 14503 | if (!window_target) |
| 14504 | window_target = FindWindowNavFocusable((focus_change_dir < 0) ? (g.WindowsFocusOrder.Size - 1) : 0, i_current, focus_change_dir); |
| 14505 | if (window_target) // Don't reset windowing target if there's a single window in the list |
| 14506 | { |
| 14507 | g.NavWindowingTarget = g.NavWindowingTargetAnim = window_target; |
| 14508 | g.NavWindowingAccumDeltaPos = g.NavWindowingAccumDeltaSize = ImVec2(0.0f, 0.0f); |
| 14509 | } |
| 14510 | g.NavWindowingToggleLayer = false; |
| 14511 | } |
| 14512 | |
| 14513 | // Apply focus and close overlay |
| 14514 | static void ImGui::NavUpdateWindowingApplyFocus(ImGuiWindow* apply_focus_window) |
no test coverage detected