| 2802 | } |
| 2803 | |
| 2804 | static void AddWindowToSortedBuffer(ImVector<ImGuiWindow*>& out_sorted_windows, ImGuiWindow* window) |
| 2805 | { |
| 2806 | out_sorted_windows.push_back(window); |
| 2807 | if (window->Active) |
| 2808 | { |
| 2809 | int count = window->DC.ChildWindows.Size; |
| 2810 | if (count > 1) |
| 2811 | qsort(window->DC.ChildWindows.begin(), (size_t)count, sizeof(ImGuiWindow*), ChildWindowComparer); |
| 2812 | for (int i = 0; i < count; i++) |
| 2813 | { |
| 2814 | ImGuiWindow* child = window->DC.ChildWindows[i]; |
| 2815 | if (child->Active) |
| 2816 | AddWindowToSortedBuffer(out_sorted_windows, child); |
| 2817 | } |
| 2818 | } |
| 2819 | } |
| 2820 | |
| 2821 | static void AddDrawListToRenderList(ImVector<ImDrawList*>& out_render_list, ImDrawList* draw_list) |
| 2822 | { |