imgui v1.78 Release Notes

Release Date: 2020-11-13 // over 3 years ago
  • Reading the full changelog is a good way to keep up to date with the things Dear ImGui has to offer, and maybe will give you ideas of some features that you've been ignoring until now!

    ๐Ÿ’ฅ Breaking Changes

    (Read carefully, not as scary as it sounds. If you maintain a language binding for dear imgui, you may want to evaluate how this might impact users, depending on the language provide dynamic dispatch functions, or simply let the low-level code handle it)

    • Obsoleted use of the trailing float power=1f parameter for those functions: [@ShironekoBen, @ocornut]
      • dragFloat(), dragFloat2(), dragFloat3(), dragFloat4(), dragFloatRange2(), dragScalar(), dragScalarN().
      • sliderFloat(), sliderFloat2(), sliderFloat3(), sliderFloat4(), sliderScalar(), sliderScalarN().
      • vSliderFloat(), vSliderScalar().
    • 0๏ธโƒฃ Replaced the final float power=1f argument with SliderFlags flags defaulting to None (aka 0, as with all our flags).
      In short, when calling those functions, if you omitted the 'power' parameter (likely in C++), you are not affected.
      DragInt, DragFloat, DragScalar: Obsoleted use of v_min > v_max to lock edits (introduced in 1.73, inconsistent, and was not demoed nor documented much, will be replaced a more generic ReadOnly feature).

    Other Changes

    • ๐Ÿ Nav: Fixed clicking on void (behind any windows) from not clearing the focused window. This would be problematic e.g. in situation where the application relies on io.wantCaptureKeyboard flag being cleared accordingly. (bug introduced in 1.77 WIP on 2020/06/16) (#3344, #2880)
    • ๐Ÿšš Window: Fixed clicking over an item which hovering has been disabled (e.g inhibited by a popup) from marking the window as moved.
    • Drag, Slider: Added SliderFlags parameters.
    • ๐Ÿ‘€ For float functions they replace the old trailing float power=1f parameter. (See #3361 and the "Breaking Changes" block above for all details).
    • โž• Added SliderFlag.Logarithmic flag to enable logarithmic editing (generally more precision around zero), as a replacement to the old 'float power' parameter which was obsoleted. (#1823, #1316, #642) [@ShironekoBen, @AndrewBelt]
    • โž• Added SliderFlag.ClampOnInput flag to force clamping value when using CTRL+Click to type in a value manually. (#1829, #3209, #946, #413).
    • โž• Added SliderFlag.NoRoundToFormat flag to disable rounding underlying value to match precision of the display format string. (#642)
    • โž• Added SliderFlag.NoInput flag to disable turning widget into a text input with CTRL+Click or Nav Enter.- Nav, Slider: Fix using keyboard/gamepad controls with certain logarithmic sliders where pushing a direction near zero values would be cancelled out. [@ShironekoBen]
    • ๐Ÿ›  dragFloatRange2, dragIntRange2: Fixed an issue allowing to drag out of bounds when both min and max value are on the same value. (#1441)
    • ๐Ÿ›  InputText, ImDrawList: Fixed assert triggering when drawing single line of text with more than ~16 KB characters. (Note that current code is going to show corrupted display if after clipping, more than 16 KB characters are visible in the same low-level DrawList::renderText() call. ImGui-level functions such as textUnformatted() are not affected. This is quite rare but it will be addressed later). (#3349)
    • ๐Ÿ›  Selectable: Fixed highlight/hit extent when used with horizontal scrolling (in or outside columns). Also fixed related text clipping when used in a column after the first one. (#3187, #3386)
    • ๐Ÿšš Scrolling: Avoid setScroll(), setScrollFromPos() functions from snapping on the edge of scroll limits when close-enough by (WindowPadding - ItemPadding), which was a tweak with too many side-effects. The behavior is still present in SetScrollHere() functions as they are more explicitly aiming at making widgets visible. May later be moved to a flag.
    • Tab Bar: Allow calling setTabItemClosed() after a tab has been submitted (will process next frame).
    • ๐Ÿ— InvisibleButton: Made public a small selection of ButtonFlags (previously in imgui_internal.h) and allowed to pass them to invisibleButton(): ButtonFlag.MouseButtonLeft/Right/Middle. This is a small but rather important change because lots of multi-button behaviors could previously only be achieved using lower-level/internal API. Now also available via high-level invisibleButton() with is a de-facto versatile building block to creating custom widgets with the public API.
    • ๐Ÿ”€ Fonts: Fixed FontConfig::glyphExtraSpacing and FontConfig::pixelSnapH settings being pulled from the merged/target font settings when merging fonts, instead of being pulled from the source font settings.
    • DrawList: Thick anti-aliased strokes (> 1.0f) with integer thickness now use a texture-based path, reducing the amount of vertices/indices and CPU/GPU usage. (#3245) [@ShironekoBen]
    • ๐Ÿ’… This change will facilitate the wider use of thick borders in future style changes.
    • 0๏ธโƒฃ Requires an extra bit of texture space (~64x64 by default), relies on GPU bilinear filtering.
    • Set io.antiAliasedLinesUseTex = false to disable rendering using this method.
    • Clear FontAtlasFlag.NoBakedLines in FontAtlas::flags to disable baking data in texture.
    • ๐Ÿ’… DrawList: changed addCircle(), addCircleFilled() default num_segments from 12 to 0, effectively enabling auto-tessellation by default. Tweak tessellation in Style Editor->Rendering section, or by modifying the style.circleSegmentMaxError value. [@ShironekoBen]
    • ๐Ÿš€ DrawList: Fixed minor bug introduced in 1.75 where addCircle() with 12 segments would generate an extra vertex. (This bug was mistakenly marked as fixed in earlier 1.77 release). [@ShironekoBen]
    • Demo: Improved "Custom Rendering"->"Canvas" demo with a grid, scrolling and context menu. Also showcase using invisibleButton() with multiple mouse buttons flags.
    • Demo: Improved "Layout & Scrolling" -> "Clipping" section.
    • ๐Ÿ Demo: Improved "Layout & Scrolling" -> "Child Windows" section.
    • ๐Ÿ’… Style Editor: Added preview of circle auto-tessellation when editing the corresponding value.

    ๐Ÿš€ Original Changelogs