imgui v1.79 Release Notes
Release Date: 2020-11-25 // over 2 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
- ๐ Fonts: Removed
Font::displayOffset
in favor ofFontConfig::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 useddisplayOffset
it was probably in association to rasterizing a font at a specific size, in which case the corresponding offset may be reported intoglyphOffset
. If you scaled this value after callingaddFontDefault()
, this is now done automatically. (#1619) ListClipper
: Renamed constructor parameters which created an ambiguous alternative to using theListClipper::begin()
function, with misleading edge cases. Always useListClipper::begin()
!- ๐
Style: Renamed
style.tabMinWidthForUnselectedCloseButton
tostyle.tabMinWidthForCloseButton
. - ๐ Renamed
SliderFlag.ClampOnInput
toSliderFlag.AlwaysClamp
. - โช Renamed
openPopupContextItem()
back toopenPopupOnItemClick()
, 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 useisWindowAppearing()
afterbeginPopup()
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 wherecontentSize
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 thatinputText()
already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active). - Fixed using
InputTextFlag.Password
withinputTextMultiline()
. 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]
- Added support for Page Up/Down in
- Tab Bar:
- Added
tabItemButton()
to submit tab that behave like a button. (#3291) [@Xipiryon] - Added
TabItemFlag.Leading
andTabItemFlag.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 withtabItemButton()
. (#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]
- Added
dragFloat
,dragScalar
: FixedSliderFlag.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 tocursorPos
prior to callingbeginMenuBar()
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 wereOpenOnArrow
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 alteringdisplayOffset.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 of
VK_LAYER_LUNARG_standard_validation` which is deprecated (#3459) [@FunMiles]
Tab Bar:
tabItemButton()
+TabItemFlag.Trailing
checkboxFlags()
with visible tri-state (previously only in internals)๐ Original Changelogs
- ๐ Fonts: Removed
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 withSliderFlags
flags defaulting toNone
(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 astextUnformatted()
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 toinvisibleButton()
: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-levelinvisibleButton()
with is a de-facto versatile building block to creating custom widgets with the public API. - ๐ Fonts: Fixed
FontConfig::glyphExtraSpacing
andFontConfig::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
inFontAtlas::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 thestyle.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
- Obsoleted use of the trailing