Minor fixes/tweaks (some to reduce drift wiih master branch)
diff --git a/imgui.cpp b/imgui.cpp
index b0f350b..9cdc2f3 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -388,7 +388,6 @@
- IMGUI_DISABLE_TEST_WINDOWS -> use IMGUI_DISABLE_DEMO_WINDOWS
- 2019/12/08 (1.75) - obsoleted calling ImDrawList::PrimReserve() with a negative count (which was the vaguely documented and rarely if ever used). Instead we added an explicit PrimUnreserve() API.
- 2019/12/06 (1.75) - removed implicit default parameter to IsMouseDragging(int button = 0) to be consistent with other mouse functions (none of the other functions have it).
->>>>>>> refs/heads/master
- 2019/11/21 (1.74) - ImFontAtlas::AddCustomRectRegular() now requires an ID larger than 0x110000 (instead of 0x10000) to conform with supporting Unicode planes 1-16 in a future update. ID below 0x110000 will now assert.
- 2019/11/19 (1.74) - renamed IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS to IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS for consistency.
- 2019/11/19 (1.74) - renamed IMGUI_DISABLE_MATH_FUNCTIONS to IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS for consistency.
@@ -3848,7 +3847,7 @@
ImRect virtual_space(FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX);
for (int n = 0; n < g.Viewports.Size; n++)
virtual_space.Add(g.Viewports[n]->GetRect());
- g.DrawListSharedData.ClipRectFullscreen = ImVec4(virtual_space.Min.x, virtual_space.Min.y, virtual_space.Max.x, virtual_space.Max.y);
+ g.DrawListSharedData.ClipRectFullscreen = ImVec4(virtual_space.Min, virtual_space.Max);
g.DrawListSharedData.CurveTessellationTol = g.Style.CurveTessellationTol;
g.DrawListSharedData.SetCircleSegmentMaxError(g.Style.CircleSegmentMaxError);
g.DrawListSharedData.InitialFlags = ImDrawListFlags_None;
@@ -4500,7 +4499,7 @@
AddRootWindowToDrawData(window);
}
for (int n = 0; n < IM_ARRAYSIZE(windows_to_render_top_most); n++)
- if (windows_to_render_top_most[n] && IsWindowActiveAndVisible(windows_to_render_top_most[n])) // NavWindowingTarget is always temporarily displayed as the tp-most window
+ if (windows_to_render_top_most[n] && IsWindowActiveAndVisible(windows_to_render_top_most[n])) // NavWindowingTarget is always temporarily displayed as the top-most window
AddRootWindowToDrawData(windows_to_render_top_most[n]);
// Draw software mouse cursor if requested
@@ -5459,7 +5458,7 @@
}
PopID();
- // Resize nav layer
+ // Restore nav layer
window->DC.NavLayerCurrent = ImGuiNavLayer_Main;
window->DC.NavLayerCurrentMask = (1 << ImGuiNavLayer_Main);
@@ -6341,13 +6340,12 @@
window->DrawList->AddRectFilled(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha * 0.25f), g.Style.WindowRounding);
}
- const bool is_undocked_or_docked_visible = !window->DockIsActive || window->DockTabIsVisible;
-
// Since 1.71, child window can render their decoration (bg color, border, scrollbars, etc.) within their parent to save a draw call.
// When using overlapping child windows, this will break the assumption that child z-order is mapped to submission order.
// We disable this when the parent window has zero vertices, which is a common pattern leading to laying out multiple overlapping child.
// We also disabled this when we have dimming overlay behind this specific one child.
// FIXME: More code may rely on explicit sorting of overlapping child window and would need to disable this somehow. Please get in contact if you are affected.
+ const bool is_undocked_or_docked_visible = !window->DockIsActive || window->DockTabIsVisible;
if (is_undocked_or_docked_visible)
{
bool render_decorations_in_parent = false;
@@ -6464,7 +6462,7 @@
NavInitWindow(window, false);
}
- // Close from platform window
+ // Close requested by platform window
if (p_open != NULL && window->Viewport->PlatformRequestClose && window->Viewport != GetMainViewport())
{
if (!window->DockIsActive || window->DockTabIsVisible)
@@ -15280,8 +15278,7 @@
char buf[256];
char* p = buf;
const char* buf_end = buf + IM_ARRAYSIZE(buf);
- p += ImFormatString(p, buf_end - p, "TabBar (%d tabs)%s",
- tab_bar->Tabs.Size, (tab_bar->PrevFrameVisible < ImGui::GetFrameCount() - 2) ? " *Inactive*" : "");
+ p += ImFormatString(p, buf_end - p, "TabBar (%d tabs)%s", tab_bar->Tabs.Size, (tab_bar->PrevFrameVisible < ImGui::GetFrameCount() - 2) ? " *Inactive*" : "");
if (tab_bar->Flags & ImGuiTabBarFlags_DockNode)
{
p += ImFormatString(p, buf_end - p, " { ");
diff --git a/imgui.h b/imgui.h
index 8cd0263..11b73b8 100644
--- a/imgui.h
+++ b/imgui.h
@@ -1454,7 +1454,7 @@
ImGuiConfigFlags ConfigFlags; // = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.
ImGuiBackendFlags BackendFlags; // = 0 // See ImGuiBackendFlags_ enum. Set by back-end (imgui_impl_xxx files or custom back-end) to communicate features supported by the back-end.
- ImVec2 DisplaySize; // <unset> // Main display size, in pixels. This is for the default viewport. Use BeginViewport() for other viewports.
+ ImVec2 DisplaySize; // <unset> // Main display size, in pixels. This is for the default viewport.
float DeltaTime; // = 1.0f/60.0f // Time elapsed since last frame, in seconds.
float IniSavingRate; // = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds.
const char* IniFilename; // = "imgui.ini" // Path to .ini file. Set NULL to disable automatic .ini loading/saving, if e.g. you want to manually load/save from memory.
diff --git a/imgui_demo.cpp b/imgui_demo.cpp
index 9c321b8..3e2fbef 100644
--- a/imgui_demo.cpp
+++ b/imgui_demo.cpp
@@ -4867,7 +4867,7 @@
Target_DockSpaceAndWindow // Create documents as regular windows, and create an embedded dockspace
};
static Target opt_target = Target_Tab;
- static bool opt_reorderable = true;
+ static bool opt_reorderable = true;
static ImGuiTabBarFlags opt_fitting_flags = ImGuiTabBarFlags_FittingPolicyDefault_;
// When (opt_target == Target_DockSpaceAndWindow) there is the possibily that one of our child Document window (e.g. "Eggplant")
diff --git a/imgui_draw.cpp b/imgui_draw.cpp
index 627e3e2..228df41 100644
--- a/imgui_draw.cpp
+++ b/imgui_draw.cpp
@@ -3153,10 +3153,10 @@
pos -= offset;
const ImTextureID tex_id = font_atlas->TexID;
draw_list->PushTextureID(tex_id);
- draw_list->AddImage(tex_id, pos + ImVec2(1, 0)*scale, pos + ImVec2(1, 0)*scale + size*scale, uv[2], uv[3], col_shadow);
- draw_list->AddImage(tex_id, pos + ImVec2(2, 0)*scale, pos + ImVec2(2, 0)*scale + size*scale, uv[2], uv[3], col_shadow);
- draw_list->AddImage(tex_id, pos, pos + size*scale, uv[2], uv[3], col_border);
- draw_list->AddImage(tex_id, pos, pos + size*scale, uv[0], uv[1], col_fill);
+ draw_list->AddImage(tex_id, pos + ImVec2(1,0)*scale, pos + ImVec2(1,0)*scale + size*scale, uv[2], uv[3], col_shadow);
+ draw_list->AddImage(tex_id, pos + ImVec2(2,0)*scale, pos + ImVec2(2,0)*scale + size*scale, uv[2], uv[3], col_shadow);
+ draw_list->AddImage(tex_id, pos, pos + size*scale, uv[2], uv[3], col_border);
+ draw_list->AddImage(tex_id, pos, pos + size*scale, uv[0], uv[1], col_fill);
draw_list->PopTextureID();
}
}
diff --git a/imgui_internal.h b/imgui_internal.h
index f17a48d..65f3221 100644
--- a/imgui_internal.h
+++ b/imgui_internal.h
@@ -1004,7 +1004,7 @@
};
//-----------------------------------------------------------------------------
-// Docking, Tabs
+// Tabs
//-----------------------------------------------------------------------------
struct ImGuiShrinkWidthItem
@@ -1022,6 +1022,10 @@
ImGuiPtrOrIndex(int index) { Ptr = NULL; Index = index; }
};
+//-----------------------------------------------------------------------------
+// Docking
+//-----------------------------------------------------------------------------
+
// Extend ImGuiDockNodeFlags_
enum ImGuiDockNodeFlagsPrivate_
{
@@ -1113,7 +1117,7 @@
};
//-----------------------------------------------------------------------------
-// Main imgui context
+// Main Dear ImGui context
//-----------------------------------------------------------------------------
struct ImGuiContext
@@ -1610,7 +1614,7 @@
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 (== (HiddenFrames*** > 0))
- bool IsFallbackWindow;
+ bool IsFallbackWindow; // Set on the "Debug##Default" window.
bool HasCloseButton; // Set when the window has a close button (p_open != NULL)
signed char ResizeBorderHeld; // Current border being held for resize (-1: none, otherwise 0-3)
short BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp
index b033ca2..fb5eb51 100644
--- a/imgui_widgets.cpp
+++ b/imgui_widgets.cpp
@@ -6366,8 +6366,6 @@
//-------------------------------------------------------------------------
// [SECTION] Widgets: BeginTabBar, EndTabBar, etc.
//-------------------------------------------------------------------------
-// [BETA API] API may evolve!
-//-------------------------------------------------------------------------
// - BeginTabBar()
// - BeginTabBarEx() [Internal]
// - EndTabBar()
@@ -6926,8 +6924,6 @@
//-------------------------------------------------------------------------
// [SECTION] Widgets: BeginTabItem, EndTabItem, etc.
//-------------------------------------------------------------------------
-// [BETA API] API may evolve!
-//-------------------------------------------------------------------------
// - BeginTabItem()
// - EndTabItem()
// - TabItemEx() [Internal]