From 6f7b1bf2e165ddb75ad325433386f2e1c904bd20 Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 19 Nov 2017 00:07:38 +0100 Subject: [PATCH] Internals: Renamed ImGuiWindow::Accessed to WriteAccessed. --- imgui.cpp | 10 +++++----- imgui_internal.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 07cda4ddf..6fe790131 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1799,7 +1799,7 @@ ImGuiWindow::ImGuiWindow(const char* name) ScrollbarX = ScrollbarY = false; ScrollbarSizes = ImVec2(0.0f, 0.0f); Active = WasActive = false; - Accessed = false; + WriteAccessed = false; Collapsed = false; SkipItems = false; Appearing = false; @@ -2410,7 +2410,7 @@ void ImGui::NewFrame() ImGuiWindow* window = g.Windows[i]; window->WasActive = window->Active; window->Active = false; - window->Accessed = false; + window->WriteAccessed = false; } // Closing the focused window restore focus to the first active root window in descending z-order @@ -2748,7 +2748,7 @@ void ImGui::EndFrame() // Hide implicit "Debug" window if it hasn't been used IM_ASSERT(g.CurrentWindowStack.Size == 1); // Mismatched Begin()/End() calls - if (g.CurrentWindow && !g.CurrentWindow->Accessed) + if (g.CurrentWindow && !g.CurrentWindow->WriteAccessed) g.CurrentWindow->Active = false; ImGui::End(); @@ -4609,7 +4609,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) // Clear 'accessed' flag last thing (After PushClipRect which will set the flag. We want the flag to stay false when the default "Debug" window is unused) if (first_begin_of_the_frame) - window->Accessed = false; + window->WriteAccessed = false; window->BeginCount++; g.SetNextWindowSizeConstraint = false; @@ -10867,7 +10867,7 @@ void ImGui::ShowMetricsWindow(bool* p_open) if (ImGui::IsItemHovered()) GImGui->OverlayDrawList.AddRect(window->Pos, window->Pos + window->Size, IM_COL32(255,255,0,255)); ImGui::BulletText("Scroll: (%.2f,%.2f)", window->Scroll.x, window->Scroll.y); - ImGui::BulletText("Active: %d, Accessed: %d", window->Active, window->Accessed); + ImGui::BulletText("Active: %d, WriteAccessed: %d", window->Active, window->WriteAccessed); if (window->RootWindow != window) NodeWindow(window->RootWindow, "RootWindow"); if (window->DC.ChildWindows.Size > 0) NodeWindows(window->DC.ChildWindows, "ChildWindows"); ImGui::BulletText("Storage: %d bytes", window->StateStorage.Data.Size * (int)sizeof(ImGuiStorage::Pair)); diff --git a/imgui_internal.h b/imgui_internal.h index 0d21c633a..ea2b397d6 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -698,7 +698,7 @@ struct IMGUI_API ImGuiWindow ImVec2 ScrollbarSizes; bool Active; // Set to true on Begin() bool WasActive; - bool Accessed; // Set to true when any widget access the current window + bool WriteAccessed; // Set to true when any widget access the current window bool Collapsed; // Set when collapsing window to become only title-bar 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) @@ -778,7 +778,7 @@ namespace ImGui // - ImGui::NewFrame() has never been called, which is illegal. // - You are calling ImGui functions after ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. inline ImGuiWindow* GetCurrentWindowRead() { ImGuiContext& g = *GImGui; return g.CurrentWindow; } - inline ImGuiWindow* GetCurrentWindow() { ImGuiContext& g = *GImGui; g.CurrentWindow->Accessed = true; return g.CurrentWindow; } + inline ImGuiWindow* GetCurrentWindow() { ImGuiContext& g = *GImGui; g.CurrentWindow->WriteAccessed = true; return g.CurrentWindow; } IMGUI_API ImGuiWindow* GetParentWindow(); IMGUI_API ImGuiWindow* FindWindowByName(const char* name); IMGUI_API void FocusWindow(ImGuiWindow* window);