Skip to content

Commit

Permalink
Comments for flags discoverability + add to debug log (ocornut#3795, o…
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Sep 27, 2022
1 parent 325299f commit a725db1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a725db1

Please sign in to comment.