From 0905202f44308f6bcc8464f2bf8df2d2ac936547 Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 5 Aug 2018 18:13:24 +0200 Subject: [PATCH] Internals: Minor renaming for consistency. --- imgui.cpp | 10 +++++----- imgui_internal.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 4cc0e622f..acc8cc0d8 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2128,7 +2128,7 @@ ImGuiWindow::ImGuiWindow(ImGuiContext* context, const char* name) Active = WasActive = false; WriteAccessed = false; Collapsed = false; - CollapseToggleWanted = false; + WantCollapseToggle = false; SkipItems = false; Appearing = false; Hidden = false; @@ -6407,8 +6407,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) // We don't use a regular button+id to test for double-click on title bar (mostly due to legacy reason, could be fixed), so verify that we don't have items over the title bar. ImRect title_bar_rect = window->TitleBarRect(); if (g.HoveredWindow == window && g.HoveredId == 0 && g.HoveredIdPreviousFrame == 0 && IsMouseHoveringRect(title_bar_rect.Min, title_bar_rect.Max) && g.IO.MouseDoubleClicked[0]) - window->CollapseToggleWanted = true; - if (window->CollapseToggleWanted) + window->WantCollapseToggle = true; + if (window->WantCollapseToggle) { window->Collapsed = !window->Collapsed; MarkIniSettingsDirty(window); @@ -6419,7 +6419,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) { window->Collapsed = false; } - window->CollapseToggleWanted = false; + window->WantCollapseToggle = false; // SIZE @@ -6729,7 +6729,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) // Collapse button if (!(flags & ImGuiWindowFlags_NoCollapse)) if (CollapseButton(window->GetID("#COLLAPSE"), window->Pos)) - window->CollapseToggleWanted = true; // Defer collapsing to next frame as we are too far in the Begin() function + window->WantCollapseToggle = true; // Defer collapsing to next frame as we are too far in the Begin() function // Close button if (p_open != NULL) diff --git a/imgui_internal.h b/imgui_internal.h index 1d932a558..adf45c392 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -983,7 +983,7 @@ struct IMGUI_API ImGuiWindow bool WasActive; bool WriteAccessed; // Set to true when any widget access the current window bool Collapsed; // Set when collapsing window to become only title-bar - bool CollapseToggleWanted; + bool WantCollapseToggle; bool SkipItems; // Set when items can safely be all clipped (e.g. window not visible or collapsed) bool Appearing; // Set during the frame where the window is appearing (or re-appearing) bool Hidden; // Do not display (== (HiddenFramesForResize > 0) ||