From 092b6825acb08d76c7fbdb9cf3e760f04108f68b Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 14 Feb 2023 15:00:12 +0100 Subject: [PATCH 1/4] Fonts: Assert that in each GlyphRanges[] pairs first is <= second. --- docs/CHANGELOG.txt | 1 + imgui.h | 2 +- imgui_draw.cpp | 5 +++++ misc/freetype/imgui_freetype.cpp | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 0d10ea842..0d4da5a5d 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -84,6 +84,7 @@ All changes: - Menus: Fixed layout of MenuItem()/BeginMenu() when label contains a '\n'. (#6116) [@imkcy9] - PlotHistogram, PlotLines: Passing negative sizes honor alignment like other widgets. - Combo: Allow SetNextWindowSize() to alter combo popup size. (#6130) +- Fonts: Assert that in each GlyphRanges[] pairs first is <= second. - ImDrawList: Added missing early-out in AddPolyline() and AddConvexPolyFilled() when color alpha is zero. - Misc: Most text functions treat "%s" as a shortcut to no-formatting. (#3466) diff --git a/imgui.h b/imgui.h index b6b583dec..de6049e1e 100644 --- a/imgui.h +++ b/imgui.h @@ -2664,7 +2664,7 @@ struct ImFontConfig bool PixelSnapH; // false // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1. ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now. ImVec2 GlyphOffset; // 0, 0 // Offset all glyphs from this font input. - const ImWchar* GlyphRanges; // NULL // Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. + const ImWchar* GlyphRanges; // NULL // THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). float GlyphMinAdvanceX; // 0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font float GlyphMaxAdvanceX; // FLT_MAX // Maximum AdvanceX for glyphs bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights. diff --git a/imgui_draw.cpp b/imgui_draw.cpp index f694ff234..6ce480db0 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -2384,7 +2384,12 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas) ImFontBuildDstData& dst_tmp = dst_tmp_array[src_tmp.DstIndex]; src_tmp.SrcRanges = cfg.GlyphRanges ? cfg.GlyphRanges : atlas->GetGlyphRangesDefault(); for (const ImWchar* src_range = src_tmp.SrcRanges; src_range[0] && src_range[1]; src_range += 2) + { + // Check for valid range. This may also help detect *some* dangling pointers, because a common + // user error is to setup ImFontConfig::GlyphRanges with a pointer to data that isn't persistent. + IM_ASSERT(src_range[0] <= src_range[1]); src_tmp.GlyphsHighest = ImMax(src_tmp.GlyphsHighest, (int)src_range[1]); + } dst_tmp.SrcCount++; dst_tmp.GlyphsHighest = ImMax(dst_tmp.GlyphsHighest, src_tmp.GlyphsHighest); } diff --git a/misc/freetype/imgui_freetype.cpp b/misc/freetype/imgui_freetype.cpp index 7361566e0..17700f16e 100644 --- a/misc/freetype/imgui_freetype.cpp +++ b/misc/freetype/imgui_freetype.cpp @@ -444,7 +444,12 @@ bool ImFontAtlasBuildWithFreeTypeEx(FT_Library ft_library, ImFontAtlas* atlas, u ImFontBuildDstDataFT& dst_tmp = dst_tmp_array[src_tmp.DstIndex]; src_tmp.SrcRanges = cfg.GlyphRanges ? cfg.GlyphRanges : atlas->GetGlyphRangesDefault(); for (const ImWchar* src_range = src_tmp.SrcRanges; src_range[0] && src_range[1]; src_range += 2) + { + // Check for valid range. This may also help detect *some* dangling pointers, because a common + // user error is to setup ImFontConfig::GlyphRanges with a pointer to data that isn't persistent. + IM_ASSERT(src_range[0] <= src_range[1]); src_tmp.GlyphsHighest = ImMax(src_tmp.GlyphsHighest, (int)src_range[1]); + } dst_tmp.SrcCount++; dst_tmp.GlyphsHighest = ImMax(dst_tmp.GlyphsHighest, src_tmp.GlyphsHighest); } From fa0852f9e5052e83d00e235b213c06dc9335d627 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 14 Feb 2023 15:20:01 +0100 Subject: [PATCH 2/4] ColorEdit, ColorPicker: Fixed hue/saturation preservation logic from interfering with the displayed value (but not stored value) of others widgets instances. (#6155) Amend 30546bc0, accb0261b, 38d22bc4 --- docs/CHANGELOG.txt | 2 ++ imgui_internal.h | 13 +++++++---- imgui_widgets.cpp | 57 ++++++++++++++++++++++++++++------------------ 3 files changed, 45 insertions(+), 27 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 0d4da5a5d..bb0bf5768 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -82,6 +82,8 @@ All changes: (Not adding Super+Delete to delete to up to end-of-line on OSX, as OSX doesn't have it) - InputText: On OSX, inhibit usage of Alt key to toggle menu when active (used for work skip). - Menus: Fixed layout of MenuItem()/BeginMenu() when label contains a '\n'. (#6116) [@imkcy9] +- ColorEdit, ColorPicker: Fixed hue/saturation preservation logic from interfering with + the displayed value (but not stored value) of others widgets instances. (#6155) - PlotHistogram, PlotLines: Passing negative sizes honor alignment like other widgets. - Combo: Allow SetNextWindowSize() to alter combo popup size. (#6130) - Fonts: Assert that in each GlyphRanges[] pairs first is <= second. diff --git a/imgui_internal.h b/imgui_internal.h index ecc84bb9b..702bdadcb 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1945,9 +1945,11 @@ struct ImGuiContext ImFont InputTextPasswordFont; ImGuiID TempInputId; // Temporary text input when CTRL+clicking on a slider, etc. ImGuiColorEditFlags ColorEditOptions; // Store user options for color edit widgets - float ColorEditLastHue; // Backup of last Hue associated to LastColor, so we can restore Hue in lossy RGB<>HSV round trips - float ColorEditLastSat; // Backup of last Saturation associated to LastColor, so we can restore Saturation in lossy RGB<>HSV round trips - ImU32 ColorEditLastColor; // RGB value with alpha set to 0. + ImGuiID ColorEditCurrentID; // Set temporarily while inside of the parent-most ColorEdit4/ColorPicker4 (because they call each others). + ImGuiID ColorEditSavedID; // ID we are saving/restoring HS for + float ColorEditSavedHue; // Backup of last Hue associated to LastColor, so we can restore Hue in lossy RGB<>HSV round trips + float ColorEditSavedSat; // Backup of last Saturation associated to LastColor, so we can restore Saturation in lossy RGB<>HSV round trips + ImU32 ColorEditSavedColor; // RGB value with alpha set to 0. ImVec4 ColorPickerRef; // Initial/reference color at the time of opening the color picker. ImGuiComboPreviewData ComboPreviewData; float SliderGrabClickOffset; @@ -2133,8 +2135,9 @@ struct ImGuiContext TempInputId = 0; ColorEditOptions = ImGuiColorEditFlags_DefaultOptions_; - ColorEditLastHue = ColorEditLastSat = 0.0f; - ColorEditLastColor = 0; + ColorEditCurrentID = ColorEditSavedID = 0; + ColorEditSavedHue = ColorEditSavedSat = 0.0f; + ColorEditSavedColor = 0; SliderGrabClickOffset = 0.0f; SliderCurrentAccum = 0.0f; SliderCurrentAccumDirty = false; diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index a8db5c935..4f03181cf 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -4978,28 +4978,32 @@ bool ImGui::ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flag return ColorEdit4(label, col, flags | ImGuiColorEditFlags_NoAlpha); } +static void ColorEditRestoreH(const float* col, float* H) +{ + ImGuiContext& g = *GImGui; + IM_ASSERT(g.ColorEditCurrentID != 0); + if (g.ColorEditSavedID != g.ColorEditCurrentID || g.ColorEditSavedColor != ImGui::ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 0))) + return; + *H = g.ColorEditSavedHue; +} + // ColorEdit supports RGB and HSV inputs. In case of RGB input resulting color may have undefined hue and/or saturation. // Since widget displays both RGB and HSV values we must preserve hue and saturation to prevent these values resetting. static void ColorEditRestoreHS(const float* col, float* H, float* S, float* V) { - // This check is optional. Suppose we have two color widgets side by side, both widgets display different colors, but both colors have hue and/or saturation undefined. - // With color check: hue/saturation is preserved in one widget. Editing color in one widget would reset hue/saturation in another one. - // Without color check: common hue/saturation would be displayed in all widgets that have hue/saturation undefined. - // g.ColorEditLastColor is stored as ImU32 RGB value: this essentially gives us color equality check with reduced precision. - // Tiny external color changes would not be detected and this check would still pass. This is OK, since we only restore hue/saturation _only_ if they are undefined, - // therefore this change flipping hue/saturation from undefined to a very tiny value would still be represented in color picker. ImGuiContext& g = *GImGui; - if (g.ColorEditLastColor != ImGui::ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 0))) + IM_ASSERT(g.ColorEditCurrentID != 0); + if (g.ColorEditSavedID != g.ColorEditCurrentID || g.ColorEditSavedColor != ImGui::ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 0))) return; // When S == 0, H is undefined. // When H == 1 it wraps around to 0. - if (*S == 0.0f || (*H == 0.0f && g.ColorEditLastHue == 1)) - *H = g.ColorEditLastHue; + if (*S == 0.0f || (*H == 0.0f && g.ColorEditSavedHue == 1)) + *H = g.ColorEditSavedHue; // When V == 0, S is undefined. if (*V == 0.0f) - *S = g.ColorEditLastSat; + *S = g.ColorEditSavedSat; } // Edit colors components (each component in 0.0f..1.0f range). @@ -5022,6 +5026,9 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag BeginGroup(); PushID(label); + const bool set_current_color_edit_id = (g.ColorEditCurrentID == 0); + if (set_current_color_edit_id) + g.ColorEditCurrentID = window->IDStack.back(); // If we're not showing any slider there's no point in doing any HSV conversions const ImGuiColorEditFlags flags_untouched = flags; @@ -5055,7 +5062,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag ColorConvertHSVtoRGB(f[0], f[1], f[2], f[0], f[1], f[2]); else if ((flags & ImGuiColorEditFlags_InputRGB) && (flags & ImGuiColorEditFlags_DisplayHSV)) { - // Hue is lost when converting from greyscale rgb (saturation=0). Restore it. + // Hue is lost when converting from grayscale rgb (saturation=0). Restore it. ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]); ColorEditRestoreHS(col, &f[0], &f[1], &f[2]); } @@ -5194,10 +5201,11 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag f[n] = i[n] / 255.0f; if ((flags & ImGuiColorEditFlags_DisplayHSV) && (flags & ImGuiColorEditFlags_InputRGB)) { - g.ColorEditLastHue = f[0]; - g.ColorEditLastSat = f[1]; + g.ColorEditSavedHue = f[0]; + g.ColorEditSavedSat = f[1]; ColorConvertHSVtoRGB(f[0], f[1], f[2], f[0], f[1], f[2]); - g.ColorEditLastColor = ColorConvertFloat4ToU32(ImVec4(f[0], f[1], f[2], 0)); + g.ColorEditSavedID = g.ColorEditCurrentID; + g.ColorEditSavedColor = ColorConvertFloat4ToU32(ImVec4(f[0], f[1], f[2], 0)); } if ((flags & ImGuiColorEditFlags_DisplayRGB) && (flags & ImGuiColorEditFlags_InputHSV)) ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]); @@ -5209,6 +5217,8 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag col[3] = f[3]; } + if (set_current_color_edit_id) + g.ColorEditCurrentID = 0; PopID(); EndGroup(); @@ -5282,6 +5292,9 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl g.NextItemData.ClearFlags(); PushID(label); + const bool set_current_color_edit_id = (g.ColorEditCurrentID == 0); + if (set_current_color_edit_id) + g.ColorEditCurrentID = window->IDStack.back(); BeginGroup(); if (!(flags & ImGuiColorEditFlags_NoSidePreview)) @@ -5330,7 +5343,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl float R = col[0], G = col[1], B = col[2]; if (flags & ImGuiColorEditFlags_InputRGB) { - // Hue is lost when converting from greyscale rgb (saturation=0). Restore it. + // Hue is lost when converting from grayscale rgb (saturation=0). Restore it. ColorConvertRGBtoHSV(R, G, B, H, S, V); ColorEditRestoreHS(col, &H, &S, &V); } @@ -5385,10 +5398,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl { S = ImSaturate((io.MousePos.x - picker_pos.x) / (sv_picker_size - 1)); V = 1.0f - ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size - 1)); - - // Greatly reduces hue jitter and reset to 0 when hue == 255 and color is rapidly modified using SV square. - if (g.ColorEditLastColor == ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 0))) - H = g.ColorEditLastHue; + ColorEditRestoreH(col, &H); // Greatly reduces hue jitter and reset to 0 when hue == 255 and color is rapidly modified using SV square. value_changed = value_changed_sv = true; } if (!(flags & ImGuiColorEditFlags_NoOptions)) @@ -5463,9 +5473,10 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl if (flags & ImGuiColorEditFlags_InputRGB) { ColorConvertHSVtoRGB(H, S, V, col[0], col[1], col[2]); - g.ColorEditLastHue = H; - g.ColorEditLastSat = S; - g.ColorEditLastColor = ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 0)); + g.ColorEditSavedHue = H; + g.ColorEditSavedSat = S; + g.ColorEditSavedID = g.ColorEditCurrentID; + g.ColorEditSavedColor = ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 0)); } else if (flags & ImGuiColorEditFlags_InputHSV) { @@ -5629,6 +5640,8 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl if (value_changed && g.LastItemData.ID != 0) // In case of ID collision, the second EndGroup() won't catch g.ActiveId MarkItemEdited(g.LastItemData.ID); + if (set_current_color_edit_id) + g.ColorEditCurrentID = 0; PopID(); return value_changed; From b0c181666412f45c199548b1e96a786e69aa76d5 Mon Sep 17 00:00:00 2001 From: Laurens Holst Date: Thu, 9 Feb 2023 21:56:04 +0100 Subject: [PATCH 3/4] Backends: OpenGL3: Fixed loader compatibility with GL_VERSION for GL 2.x (#6154, #4445, #3530) GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above. So we have to parse GL_VERSION under GL 2.x Reference https://www.khronos.org/opengl/wiki/OpenGL_Context#Context_information_queries Regressed since 459de65477423360176447e79df2f3a785b71f3d See https://github.com/ocornut/imgui/pull/3530 --- backends/imgui_impl_opengl3_loader.h | 10 ++++++++-- docs/CHANGELOG.txt | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/backends/imgui_impl_opengl3_loader.h b/backends/imgui_impl_opengl3_loader.h index 5b6615e94..2ebb2cf05 100644 --- a/backends/imgui_impl_opengl3_loader.h +++ b/backends/imgui_impl_opengl3_loader.h @@ -685,7 +685,13 @@ static int parse_version(void) return GL3W_ERROR_INIT; glGetIntegerv(GL_MAJOR_VERSION, &version.major); glGetIntegerv(GL_MINOR_VERSION, &version.minor); - if (version.major < 3) + if (version.major == 0 && version.minor == 0) + { + // Query GL_VERSION in desktop GL 2.x, the string will start with "." + const char* gl_version = (const char*)glGetString(GL_VERSION); + sscanf(gl_version, "%d.%d", &version.major, &version.minor); + } + if (version.major < 2) return GL3W_ERROR_OPENGL_VERSION; return GL3W_OK; } @@ -709,7 +715,7 @@ int imgl3wInit2(GL3WGetProcAddressProc proc) int imgl3wIsSupported(int major, int minor) { - if (major < 3) + if (major < 2) return 0; if (version.major == major) return version.minor >= minor; diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index bb0bf5768..fb9df81e2 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -116,7 +116,8 @@ All changes: - Backends: GLFW: Added ImGui_ImplGlfw_SetCallbacksChainForAllWindows() to instruct backend to chain callbacks even for secondary viewports/windows. User callbacks may need to test the 'window' parameter. (#6142) -- Backends: WebGPU: Fix building for latest WebGPU specs (remove implicit layout generation). +- Backends: OpenGL3: Fixed GL loader compatibility with 2.x profiles. (#6154, #4445, #3530) [@grauw] +- Backends: WebGPU: Fixed building for latest WebGPU specs (remove implicit layout generation). (#6117, #4116, #3632) [@tonygrue, @bfierz] - Examples: refactored SDL2+GL and GLFW+GL examples to compile with Emscripten. (#2492, #2494, #3699, #3705) [@ocornut, @nicolasnoble] From 458a1090314a965dd37b02c918d83077a0142ad5 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 14 Feb 2023 15:42:32 +0100 Subject: [PATCH 4/4] Version 1.89.3 --- docs/CHANGELOG.txt | 40 +++++++++++++++++++++------------------- imgui.cpp | 2 +- imgui.h | 6 +++--- imgui_demo.cpp | 2 +- imgui_draw.cpp | 2 +- imgui_internal.h | 2 +- imgui_tables.cpp | 2 +- imgui_widgets.cpp | 2 +- 8 files changed, 30 insertions(+), 28 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index fb9df81e2..06f7e1afa 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -32,29 +32,39 @@ HOW TO UPDATE? ----------------------------------------------------------------------- - VERSION 1.89.3 (In Progress) + VERSION 1.89.3 (Released 2023-02-14) ----------------------------------------------------------------------- +Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.3 + Breaking Changes: - Backends+Examples: SDL2: renamed all unnumbered references to "sdl" to "sdl2". - This is in prevision for the future release of SDL3 (#6146) + This is in prevision for the future release of SDL3 and its associated backend. (#6146) - imgui_impl_sdl.cpp -> imgui_impl_sdl2.cpp - imgui_impl_sdl.h -> imgui_impl_sdl2.h - example_sdl_xxxx/ -> example_sdl2_xxxx/ (folders and projects) All changes: +- SeparatorText(): Added SeparatorText() widget. (#1643) [@phed, @ocornut] + - Added to style: float SeparatorTextBorderSize. + - Added to style: ImVec2 SeparatorTextAlign, SeparatorTextPadding. +- Tables: Raised max Columns count from 64 to 512. (#6094, #5305, #4876, #3572) + The previous limit was due to using 64-bit integers but we moved to bits-array + and tweaked the system enough to ensure no performance loss. +- Tables: Solved an ID conflict issue with multiple-instances of a same table, + due to how unique table instance id was generated. (#6140) [@ocornut, @rodrigorc] - Inputs, Scrolling: Made horizontal scroll wheel and horizontal scroll direction consistent - accross backends/os. (#4019, #6096, #1463) [@PathogenDavid, @ocornut, @rokups] + across backends/os. (#4019, #6096, #1463) [@PathogenDavid, @ocornut, @rokups] - Clarified that 'wheel_y > 0.0f' scrolls Up, 'wheel_y > 0.0f' scrolls Down. Clarified that 'wheel_x > 0.0f' scrolls Left, 'wheel_x > 0.0f' scrolls Right. - Backends: Fixed horizontal scroll direction for Win32 and SDL backends. (#4019) - Shift+WheelY support on non-OSX machines was already correct. (#2424, #1463) - (whereaas on OSX machines Shift+WheelY turns into WheelX at the OS level). - - If you use a custom-backend, you should verify horizontal wheel direction. - - Axises are flipped by OSX for mouse & touchpad when 'Natural Scrolling' is on. - - Axises are flipped by Windows for touchpad when 'Settings->Touchpad->Down motion scrolls up' is on. + (whereas on OSX machines Shift+WheelY turns into WheelX at the OS level). + - If you use a custom backend, you should verify horizontal wheel direction. + - Axises are flipped by OSX for mouse & touch-pad when 'Natural Scrolling' is on. + - Axises are flipped by Windows for touch-pad when 'Settings->Touchpad->Down motion scrolls up' is on. - You can use 'Demo->Tools->Debug Log->IO" to visualize values submitted to Dear ImGui. - Known issues remaining with Emscripten: - The magnitude of wheeling values on Emscripten was improved but isn't perfect. (#6096) @@ -64,14 +74,6 @@ All changes: to find a way to detect this and set io.ConfigMacOSXBehaviors manually (if you know a way let us know!), or offer the "OSX-style behavior" option to their user. - Window: Avoid rendering shapes for hidden resize grips. -- SeparatorText(): Added SeparatorText() widget. (#1643) [@phed, @ocornut] - - Added to style: float SeparatorTextBorderSize. - - Added to style: ImVec2 SeparatorTextAlign, SeparatorTextPadding. -- Tables: Raised max Columns count from 64 to 512. (#6094, #5305, #4876, #3572) - The previous limit was due to using 64-bit integers but we moved to bits-array - and tweaked the system enough to ensure no performance loss. -- Tables: Solved an ID conflict issue with multiple-instances of a same table, - due to how unique table instance id was generated. (#6140) [@ocornut, @rodrigorc] - Text: Fixed layouting of wrapped-text block skipping successive empty lines, regression from the fix in 1.89.2. (#5720, #5919) - Text: Fixed clipping of single-character "..." ellipsis (U+2026 or U+0085) when font @@ -95,15 +97,15 @@ All changes: can exacerbate that. (#6114, #3644) - Backends: OSX: Fixed scroll/wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mices). -- Backends: Win32: flipping WM_MOUSEHWHEEL value to match other backends and +- Backends: Win32: flipping WM_MOUSEHWHEEL horizontal value to match other backends and offer consistent horizontal scrolling direction. (#4019) -- Backends: SDL2: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and +- Backends: SDL2: flipping SDL_MOUSEWHEEL horizontal value to match other backends and offer consistent horizontal scrolling direction. (#4019) - Backends: SDL2: Removed SDL_MOUSEWHEEL value clamping. (#4019, #6096, #6081) - Backends: SDL2: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data for smooth scrolling as reported by SDL. (#4019, #6096) - Backends: SDL2: Avoid calling SDL_SetCursor() when cursor has not changed, as the function - is surprisingly costly on Mac with latest SDL (may be fixed in next SDL version). (#6113) + is surprisingly costly on Mac with latest SDL (already fixed in SDL latest trunk). (#6113) - Backends: SDL2: Implement IME handler to call SDL_SetTextInputRect()/SDL_StartTextInput(). It will only works with SDL 2.0.18+ if your code calls 'SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1")' prior to calling SDL_CreateWindow(). Updated all examples accordingly. (#6071, #1953) @@ -126,7 +128,7 @@ All changes: - Examples: Win32: Fixed examples using RegisterClassW() since 1.89 to also call DefWindowProcW() instead of DefWindowProc() so that title text are correctly converted when application is compiled without /DUNICODE. (#5725, #5961, #5975) [@markreidvfx] -- Examples: SDL2+SDL_Renderer: Added call to SDL_RenderSetScale() to display is correct on a +- Examples: SDL2+SDL_Renderer: Added call to SDL_RenderSetScale() to fix display on a Retina display (albeit lower-res as our other unmodified examples). (#6121, #6065, #5931). diff --git a/imgui.cpp b/imgui.cpp index 96f79beb3..c39d19f9a 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.3 WIP +// dear imgui, v1.89.3 // (main code and documentation) // Help: diff --git a/imgui.h b/imgui.h index de6049e1e..4c2c93b08 100644 --- a/imgui.h +++ b/imgui.h @@ -1,4 +1,4 @@ -// dear imgui, v1.89.3 WIP +// dear imgui, v1.89.3 // (headers) // Help: @@ -22,8 +22,8 @@ // Library Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345') -#define IMGUI_VERSION "1.89.3 WIP" -#define IMGUI_VERSION_NUM 18928 +#define IMGUI_VERSION "1.89.3" +#define IMGUI_VERSION_NUM 18930 #define IMGUI_HAS_TABLE /* diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 2859c947c..aa2ed498d 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.3 WIP +// dear imgui, v1.89.3 // (demo code) // Help: diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 6ce480db0..97097cef8 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.3 WIP +// dear imgui, v1.89.3 // (drawing and font code) /* diff --git a/imgui_internal.h b/imgui_internal.h index 702bdadcb..6fd5aabfa 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1,4 +1,4 @@ -// dear imgui, v1.89.3 WIP +// dear imgui, v1.89.3 // (internal structures/api) // You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility. diff --git a/imgui_tables.cpp b/imgui_tables.cpp index e29324744..ce5213e0c 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.3 WIP +// dear imgui, v1.89.3 // (tables and columns code) /* diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 4f03181cf..fc71faff1 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.3 WIP +// dear imgui, v1.89.3 // (widgets code) /*