Internals: renaming IndexWithinParent to OrderWithinParent
This commit is contained in:
parent
25f3717a1c
commit
85d9c8fb46
@ -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))
|
||||
|
@ -620,7 +620,7 @@ struct IMGUI_API ImGuiWindow
|
||||
char* Name;
|
||||
ImGuiID ID; // == ImHash(Name)
|
||||
ImGuiWindowFlags Flags; // See enum ImGuiWindowFlags_
|
||||
int IndexWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0.
|
||||
int OrderWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0.
|
||||
ImVec2 PosFloat;
|
||||
ImVec2 Pos; // Position rounded-up to nearest pixel
|
||||
ImVec2 Size; // Current size (==SizeFull or collapsed title bar size)
|
||||
|
Loading…
Reference in New Issue
Block a user