Repository navigation
1.89.7
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.hoverDelayNormaltostyle.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. UsesetNextItemAllowOverlap()before item instead. - Added
setNextItemAllowOverlap()(called before an item) as a replacement for usingsetItemAllowOverlap()(called after an item). This is roughly equivalent to using the legacysetItemAllowOverlap()call (public API) +ButtonFlag,AllowOverlap(internal). - Renamed 'TreeNodeFlag.AllowItemOverlap
toTreeNodeFlag,AllowOverlap` for consistency. - Renamed
SelectableFlag.AllowItemOverlaptoSelectableFlag.AllowOverlapfor consistency.
- Obsoleted
Other Changes:
- Tooltips/IsItemHovered() related changes:
- Tooltips: Added
setItemTooltip()andbeginItemTooltip()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 addedHoveredFlag.Tooltipis 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.Stationaryto require mouse being stationary when hovering a new item. Addedstyle.hoverStationaryDelay(~0.15 sec). Once the mouse has been stationary once the state is preserved for same item. (ocornut/imgui#1485) - IsItemHovered: Added
HoveredFlag.ForTooltipas a shortcut for pulling flags fromstyle.hoverFlagsForTooltipMouseorstyle.hoverFlagsForTooltipNavdepending on active inputs. (ocornut/imgui#1485)style.hoverFlagsForTooltipMousedefaults toHoveredFlag.Stationary | HoveredFlag.DelayShort.style.hoverFlagsForTooltipNavdefaults toHoveredFlag.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.hoverDelayNormalfrom 0.30 to 0.40, Tweaked default value ofstyle.hoverDelayShortfrom 0.10 to 0.15. (ocornut/imgui#1485) - IsItemHovered: Added
HoveredFlag.AllowWhenOverlappedByWindowto ignore window-overlap only. OptionHoveredFlag.AllowWhenOverlappednow expand into a combination of both.AllowWhenOverlappedByWindow + .AllowWhenOverlappedByItem, matching old behavior.
- Tooltips: Added
- Overlapping items: (ocornut/imgui#6512, ocornut/imgui#3909, ocornut/imgui#517)
- Most item types should now work with
setNextItemAllowOverlap(). (ocornut/imgui#6512, ocornut/imgui#3909, ocornut/imgui#517) - Fixed first frame of an overlap highlighting underlying item if previous frame didn't hover anything.
- IsItemHovered: Changed to return false when querying an item using AllowOverlap mode which is being overlapped. Added
HoveredFlag.AllowWhenOverlappedByItemto opt-out. (ocornut/imgui#6512, ocornut/imgui#3909, ocornut/imgui#517) - Selectable, TreeNode: When using
SelectableFlag.AllowOverlap/TreeNodeFlag.AllowOverlapand holding item held, overlapping widgets won't appear as hovered. (ocornut/imgui#6512, ocornut/imgui#3909)
- Most item types should now work with
- 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+.Leafflags. (ocornut/imgui#6549) - InputText: Fixed not returning true when buffer is cleared while using the
InputTextFlag.EscapeClearsAllflag. (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::insertCharsaccept(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 whenDragDropFlag.SourceNoDisableHoveris 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.configDebugIniSettingsoption 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)