imgui v1.79 Release Notes

Release Date: 2020-11-25 // 11 months 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

    • ๐Ÿšš Fonts: Removed Font::displayOffset in favor of FontConfig::glyphOffset. displayOffset was applied after scaling and not very meaningful/useful outside of being needed by the default ProggyClean font. It was also getting in the way of better font scaling, so let's get rid of it now! If you used displayOffset it was probably in association to rasterizing a font at a specific size, in which case the corresponding offset may be reported into glyphOffset. If you scaled this value after calling addFontDefault(), this is now done automatically. (#1619)
    • ListClipper: Renamed constructor parameters which created an ambiguous alternative to using the ListClipper::begin() function, with misleading edge cases. Always use ListClipper::begin()!
    • ๐Ÿ’… Style: Renamed style.tabMinWidthForUnselectedCloseButton to style.tabMinWidthForCloseButton.
    • ๐Ÿ“‡ Renamed SliderFlag.ClampOnInput to SliderFlag.AlwaysClamp.
    • โช Renamed openPopupContextItem() back to openPopupOnItemClick(), REVERTED CHANGE FROM 1.77. For variety of reason this is more self-explanatory and less error-prone.
    • โœ‚ Removed return value from openPopupOnItemClick() - returned true on mouse release on item - because it is inconsistent with other popups API and makes others misleading. It's also and unnecessary: you can use isWindowAppearing() after beginPopup() for a similar result.

    Other Changes

    • ๐Ÿ›  Vulkan backend fixed and available!
    • ๐Ÿ›  Window: Fixed using non-zero pivot in setNextWindowPos() when the window is collapsed. (#3433)
    • Nav:
      • Fixed navigation resuming on first visible item when using gamepad. [@rokups]
      • Fixed using Alt to toggle the Menu layer when inside a Modal window. (#787)
    • ๐Ÿ›  Scrolling: Fixed setScrollHere() functions edge snapping when called during a frame where contentSize is changing (issue introduced in 1.78). (#3452).
    • InputText:
      • Added support for Page Up/Down in inputTextMultiline(). (#3430) [@Xipiryon]
      • Added selection helpers in InputTextCallbackData().
      • Added InputTextFlag.CallbackEdit to modify internally owned buffer after an edit (note that inputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active).
      • Fixed using InputTextFlag.Password with inputTextMultiline(). It is a rather unusual or useless combination of features but no reason it shouldn't work! (#3427, #3428)
      • Fixed minor scrolling glitch when erasing trailing lines in inputTextMultiline().
      • Fixed cursor being partially covered after using CTRL+End key.
      • Fixed callback's helper deleteChars() function when cursor is inside the deleted block. (#3454)
      • Made pressing Down arrow on the last line when it doesn't have a carriage return not move to the end of the line (so it is consistent with Up arrow, and behave same as Notepad and Visual Studio. Note that some other text editors instead would move the cursor to the end of the line). [@Xipiryon]
    • Tab Bar:
      • Added tabItemButton() to submit tab that behave like a button. (#3291) [@Xipiryon]
      • Added TabItemFlag.Leading and TabItemFlag.Trailing flags to position tabs or button at either end of the tab bar. Those tabs won't be part of the scrolling region, and when reordering cannot be moving outside of their section. Most often used with tabItemButton(). (#3291) [@Xipiryon]
      • Added TabItemFlag.NoReorder flag to disable reordering a given tab.
      • Keep tab item close button visible while dragging a tab (independent of hovering state).
      • Fixed a small bug where closing a tab that is not selected would leave a tab hole for a frame.
      • Fixed a small bug where scrolling buttons (with TabBarFlag.FittingPolicyScroll) would generate an unnecessary extra draw call.
      • Fixed a small bug where toggling a tab bar from Reorderable to not Reorderable would leave tabs reordered in the tab list popup. [@Xipiryon]
    • dragFloat, dragScalar: Fixed SliderFlag.ClampOnInput not being honored in the special case where v_min == v_max. (#3361)
    • ๐Ÿ›  sliderInt, sliderScalar: Fixed reaching of maximum value with inverted integer min/max ranges, both with signed and unsigned types. Added reverse Sliders to Demo. (#3432, #3449) [@rokups]
    • Text: Bypass unnecessary formatting when using the textColored()/textWrapped()/textDisabled() helpers with a "%s" format string. (#3466)
    • CheckboxFlags: Display mixed-value/tristate marker when passed flags that have multiple bits set and stored value matches neither zero neither the full set.
    • ๐Ÿ›  BeginMenuBar: Fixed minor bug where cursorPosMax gets pushed to cursorPos prior to calling beginMenuBar() so e.g. calling the function at the end of a window would often add +itemSpacing.y to scrolling range.
    • ๐Ÿ‘ treeNode, collapsingHeader: Made clicking on arrow toggle toggle the open state on the Mouse Down event rather than the Mouse Down+Up sequence, even if the .OpenOnArrow flag isn't set. This is standard behavior and amends the change done in 1.76 which only affected cases were OpenOnArrow flag was set. (This is also necessary to support full multi/range-select/drag and drop operations.)
    • Columns: Fix inverted clipRect being passed to renderer when using certain primitives inside of a fully clipped column. (#3475) [@szreder]
    • Popups, Tooltips: Fix edge cases issues with positioning popups and tool-tips when they are larger than viewport on either or both axises. [@rokups]
    • 0๏ธโƒฃ Fonts: addFontDefault() adjust its vertical offset based on floor(size/13) instead of always +1. Was previously done by altering displayOffset.y but wouldn't work for DPI scaled font.
    • ๐Ÿ Metrics: Various tweaks, listing windows front-to-back, greying inactive items when possible.
    • Demo: Add simple inputText() callbacks demo (aside from the more elaborate ones in Examples->Console).
    • Backends:
      • Vulkan:
      • Some internal refactor aimed at allowing multi-viewport feature to create their own render pass. (#3455, #3459) [@FunMiles]
      • Reworked buffer resize handling, fix for Linux/X11. (#3390, #2626) [@RoryO]
      • Switch validation layer to use `VK\_LAYER\_KHRONOS\_validation instead ofVK_LAYER_LUNARG_standard_validation` which is deprecated (#3459) [@FunMiles]

    Tab Bar: tabItemButton() + TabItemFlag.Trailing

    image

    checkboxFlags() with visible tri-state (previously only in internals)

    image

    ๐Ÿš€ Original Changelogs


Previous changes from v1.78

  • 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