From a725db17b7632f93f655327c49b55878be309315 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 27 Sep 2022 18:47:20 +0200 Subject: [PATCH] Comments for flags discoverability + add to debug log (#3795, #4559) --- imgui.cpp | 2 ++ imgui.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index 0f5549402c6d..04b43a31578d 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4229,6 +4229,7 @@ static void StartLockWheelingWindow(ImGuiWindow* window) ImGuiContext& g = *GImGui; if (g.WheelingWindow == window) return; + IMGUI_DEBUG_LOG_IO("StartLockWheelingWindow() \"%s\"\n", window ? window->Name : "NULL"); g.WheelingWindow = window; g.WheelingWindowRefMousePos = g.IO.MousePos; g.WheelingWindowTimer = WINDOWS_MOUSE_WHEEL_SCROLL_LOCK_TIMER; @@ -4246,6 +4247,7 @@ void ImGui::UpdateMouseWheel() g.WheelingWindowTimer = 0.0f; if (g.WheelingWindowTimer <= 0.0f) { + IMGUI_DEBUG_LOG_IO("UpdateMouseWheel() release WheelingWindow lock \"%s\"\n", g.WheelingWindow->Name); g.WheelingWindow = NULL; g.WheelingWindowTimer = 0.0f; } diff --git a/imgui.h b/imgui.h index 8e1dc915ba01..d7bb365de0ec 100644 --- a/imgui.h +++ b/imgui.h @@ -947,6 +947,7 @@ namespace ImGui //----------------------------------------------------------------------------- // Flags for ImGui::Begin() +// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) enum ImGuiWindowFlags_ { ImGuiWindowFlags_None = 0, @@ -984,6 +985,7 @@ enum ImGuiWindowFlags_ }; // Flags for ImGui::InputText() +// (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigInputTextCursorBlink and io.ConfigInputTextEnterKeepActive) enum ImGuiInputTextFlags_ { ImGuiInputTextFlags_None = 0, @@ -1678,6 +1680,7 @@ enum ImGuiColorEditFlags_ // Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. // We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. +// (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigDragClickToInputText) enum ImGuiSliderFlags_ { ImGuiSliderFlags_None = 0,