Skip to content

1.89.7

Choose a tag to compare

@elect86 elect86 released this 01 Sep 16:44
· 7 commits to master since this release

v1.89.7

1.89.7: Summer release! 🌞

Reading the 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!


Dear ImGui is funded by your contributions and needs them right now.
If your company uses Dear ImGui, consider reaching out.

Changes

This is a followup to v1.89, v1.89.2, v1.89.3, v1.89.4, v1.89.5, v1.89.6. We are trying to make more frequent releases. Because: some people are relying on tagging and auto-generated bindings for other languages. And: it sets a beat and may encourage teams to update more frequently.

Omar has been stubbornly deferring tagging 1.90 for while because he wanted to include the range-select feature in it, but it's not done... But there are about 540 lines of changelog between 1.89 and 1.89.7.

Breaking Changes:

  • Moved io.hoverDelayShort/io.hoverDelayNormal to style.hoverDelayShort/style.hoverDelayNormal. As the fields were added in 1.89 and expected to be left unchanged by most users, or only tweaked once during app initialization, we are exceptionally accepting the breakage. Majority of users are likely to not even notice.
  • Overlapping items: (ocornut/imgui#6512, ocornut/imgui#3909, ocornut/imgui#517)
    • Obsoleted setItemAllowOverlap(): it didn't and couldn't work reliably since 1.89 (2022-11-15), and relied on ambiguously defined design. Use setNextItemAllowOverlap() before item instead.
    • Added setNextItemAllowOverlap() (called before an item) as a replacement for using setItemAllowOverlap() (called after an item). This is roughly equivalent to using the legacy setItemAllowOverlap() call (public API) + ButtonFlag,AllowOverlap (internal).
    • Renamed 'TreeNodeFlag.AllowItemOverlaptoTreeNodeFlag,AllowOverlap` for consistency.
    • Renamed SelectableFlag.AllowItemOverlap to SelectableFlag.AllowOverlap for consistency.

Other Changes:

  • Tooltips/IsItemHovered() related changes:
    • Tooltips: Added setItemTooltip() and beginItemTooltip() helper functions.
    • They are shortcuts for the common idiom of using isItemHovered().
      • setItemTooltip("Hello") == if (isItemHovered(HoveredFlag.Tooltip)) setTooltip("Hello")
      • beginItemTooltip() == isItemHovered(HoveredFlag.Tooltip) && beginTooltip()
        The newly added HoveredFlag.Tooltip is meant to facilitate standardizing mouse hovering delays and rules for a given application. The previously common idiom of using 'if (isItemHovered()) setTooltip(...)' won't use delay or stationary test.
    • IsItemHovered: Added HoveredFlag.Stationary to require mouse being stationary when hovering a new item. Added style.hoverStationaryDelay (~0.15 sec). Once the mouse has been stationary once the state is preserved for same item. (ocornut/imgui#1485)
    • IsItemHovered: Added HoveredFlag.ForTooltip as a shortcut for pulling flags from style.hoverFlagsForTooltipMouse or style.hoverFlagsForTooltipNav depending on active inputs. (ocornut/imgui#1485)
      • style.hoverFlagsForTooltipMouse defaults to HoveredFlag.Stationary | HoveredFlag.DelayShort.
      • style.hoverFlagsForTooltipNav defaults to HoveredFlag.NoSharedDelay | HoveredFlag.DelayNormal.
    • Tooltips: Tweak default offset for non-drag and drop tooltips so underlying items isn't covered as much. (Match offset for drag and drop tooltips)
    • IsItemHovered: Tweaked default value of style.hoverDelayNormal from 0.30 to 0.40, Tweaked default value of style.hoverDelayShort from 0.10 to 0.15. (ocornut/imgui#1485)
    • IsItemHovered: Added HoveredFlag.AllowWhenOverlappedByWindow to ignore window-overlap only. Option HoveredFlag.AllowWhenOverlapped now expand into a combination of both .AllowWhenOverlappedByWindow + .AllowWhenOverlappedByItem, matching old behavior.
  • Overlapping items: (ocornut/imgui#6512, ocornut/imgui#3909, ocornut/imgui#517)
  • IsWindowHovered: Added support for HoveredFlag.Stationary.
  • IsWindowHovered, IsItemHovered: Assert when passed any unsupported flags.
  • Tables: Fixed a regression in 1.89.6 leading to the first column of tables with either ScrollX or ScrollY flags from being impossible to resize. (ocornut/imgui#6503)
  • CollapsingHeader/TreeNode: Fixed text padding when using .Framed+.Leaf flags. (ocornut/imgui#6549)
  • InputText: Fixed not returning true when buffer is cleared while using the InputTextFlag.EscapeClearsAll flag. (ocornut/imgui#5688, ocornut/imgui#2620)
  • InputText: Fixed a crash on deactivating a ReadOnly buffer. (ocornut/imgui#6570, ocornut/imgui#6292, ocornut/imgui#4714)
  • InputText: InputTextCallbackData::insertChars accept (null, null) range, in order to conform to common idioms (e.g. passing .data(), .data() + .size() from a null string). (ocornut/imgui#6565, ocornut/imgui#6566, ocornut/imgui#3615)
  • Combo: Made simple/legacy Combo() function not returns true when picking already selected item. This is consistent with other widgets. If you need something else, you can use BeginCombo(). (ocornut/imgui#1182)
  • Clipper: Rework inner logic to allow functioning with a zero-clear constructor. This is order to facilitate usage for language bindings (e.g cimgui or dear_binding) where user may not be calling a constructor manually. (ocornut/imgui#5856)
  • Drag and Drop: Apply default behavior of drag source not reporting itself as hovered at lower-level, so drag, slider, input, Plot widgets are fulfilling it. (Behavior doesn't apply when DragDropFlag.SourceNoDisableHover is set).
  • Modals: In the case of nested modal, made sure that focused or appearing windows are moved below the lowest blocking modal (rather than the highest one). (ocornut/imgui#4317)
  • Debug Tools: Added io.configDebugIniSettings option to save .ini data with extra comments. Currently mainly for inspecting Docking .ini data, but makes saving slower.
  • Demo: Added more developed Widgets->Tooltips section. (ocornut/imgui#1485)
  • Backends: OpenGL3: Fixed support for glBindSampler() backup/restore on ES3. (ocornut/imgui#6375, ocornut/imgui#6508) [@jsm174]
  • Backends: OpenGL3: Fixed erroneous use glGetIntegerv(GL_CONTEXT_PROFILE_MASK) on contexts lower than 3.2. (ocornut/imgui#6539, ocornut/imgui#6333) [@krumelmonster]
    Backends: GLFW: AcceptglfwGetTime()` not returning a monotonically increasing value. This seems to happens on some Windows setup when peripherals disconnect, and is likely to also happen on browser+Emscripten. Matches similar 1.89.4 fix in SDL backend. (ocornut/imgui#6491)