| 4045 | } |
| 4046 | |
| 4047 | static void AddWindowToSortBuffer(ImVector<ImGuiWindow*>* out_sorted_windows, ImGuiWindow* window) |
| 4048 | { |
| 4049 | out_sorted_windows->push_back(window); |
| 4050 | if (window->Active) |
| 4051 | { |
| 4052 | int count = window->DC.ChildWindows.Size; |
| 4053 | if (count > 1) |
| 4054 | ImQsort(window->DC.ChildWindows.Data, (size_t)count, sizeof(ImGuiWindow*), ChildWindowComparer); |
| 4055 | for (int i = 0; i < count; i++) |
| 4056 | { |
| 4057 | ImGuiWindow* child = window->DC.ChildWindows[i]; |
| 4058 | if (child->Active) |
| 4059 | AddWindowToSortBuffer(out_sorted_windows, child); |
| 4060 | } |
| 4061 | } |
| 4062 | } |
| 4063 | |
| 4064 | static void AddDrawListToDrawData(ImVector<ImDrawList*>* out_list, ImDrawList* draw_list) |
| 4065 | { |