|
|
@ -1776,7 +1776,7 @@ ImGuiWindow::ImGuiWindow(const char* name) |
|
|
|
MoveId = GetID("#MOVE"); |
|
|
|
|
|
|
|
Flags = 0; |
|
|
|
IndexWithinParent = 0; |
|
|
|
OrderWithinParent = 0; |
|
|
|
PosFloat = Pos = ImVec2(0.0f, 0.0f); |
|
|
|
Size = SizeFull = ImVec2(0.0f, 0.0f); |
|
|
|
SizeContents = SizeContentsExplicit = ImVec2(0.0f, 0.0f); |
|
|
@ -2568,7 +2568,7 @@ static int ChildWindowComparer(const void* lhs, const void* rhs) |
|
|
|
return d; |
|
|
|
if (int d = (a->Flags & ImGuiWindowFlags_ComboBox) - (b->Flags & ImGuiWindowFlags_ComboBox)) |
|
|
|
return d; |
|
|
|
return (a->IndexWithinParent - b->IndexWithinParent); |
|
|
|
return (a->OrderWithinParent - b->OrderWithinParent); |
|
|
|
} |
|
|
|
|
|
|
|
static void AddWindowToSortedBuffer(ImVector<ImGuiWindow*>& out_sorted_windows, ImGuiWindow* window) |
|
|
@ -3991,7 +3991,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us |
|
|
|
if (first_begin_of_the_frame) |
|
|
|
{ |
|
|
|
window->Active = true; |
|
|
|
window->IndexWithinParent = 0; |
|
|
|
window->OrderWithinParent = 0; |
|
|
|
window->BeginCount = 0; |
|
|
|
window->ClipRect = ImVec4(-FLT_MAX,-FLT_MAX,+FLT_MAX,+FLT_MAX); |
|
|
|
window->LastFrameActive = current_frame; |
|
|
@ -4111,7 +4111,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us |
|
|
|
// Position child window
|
|
|
|
if (flags & ImGuiWindowFlags_ChildWindow) |
|
|
|
{ |
|
|
|
window->IndexWithinParent = parent_window->DC.ChildWindows.Size; |
|
|
|
window->OrderWithinParent = parent_window->DC.ChildWindows.Size; |
|
|
|
parent_window->DC.ChildWindows.push_back(window); |
|
|
|
} |
|
|
|
if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup)) |
|
|
|