@ocornut ocornut released this Sep 6, 2018 · 56 commits to master since this release

Assets 2

v1.65: Passing breeze

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
See https://github.com/ocornut/imgui/wiki for language/framework bindings, links, 3rd parties helpers/extensions.
New users: go to https://discourse.dearimgui.org for technical support.

TL;DR

  • This is a minor release, completing the refactor recently done for 1.64. If you are updating from a version BEFORE 1.64 and you have any local modifications of the code, make sure you read the 1.64 release notes carefully.

Breaking Changes

  • Renamed stb_truetype.h to imstb_truetype.h, stb_textedit.h to imstb_textedit.h, and
    stb_rect_pack.h to imstb_rectpack.h. If you were conveniently using the imgui copy of those
    STB headers in your project, you will have to update your include paths. If you are manually copying files to update your copy of imgui, make sure you delete the old stb_.h file in the same directory. (#1718, #2036)
    The reason for this change is to avoid conflicts for projects that may also be importing
    their own copy of the STB libraries. Note that imgui's copy of stb_textedit.h is modified.
  • Renamed io.ConfigCursorBlink to io.ConfigInputTextCursorBlink. (#1427)

Other Changes:

  • This is a minor release following the 1.64 refactor, with a little more shuffling of code.
  • Clarified and improved the source code sectioning in all files (easier to search or browse sections).
  • Nav: Removed the [Beta] tag from various descriptions of the gamepad/keyboard navigation system.
    Although it is not perfect and will keep being improved, it is fairly functional and used by many. (#787)
  • Fixed a build issue with non-Cygwin GCC under Windows.
  • Demo: Added a "Configuration" block to make io.ConfigFlags/io.BackendFlags more prominent.
  • Some more internal refactoring, and exposed more of the Drag/Slider stuff in imgui_internal.h.
  • Examples: OpenGL3: Fixed error condition when using the GLAD loader. (#2059, #2002). [@jiri]

@ocornut ocornut released this Aug 31, 2018 · 72 commits to master since this release

Assets 2

v1.64: End of summer refactoring

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
See https://github.com/ocornut/imgui/wiki for language/framework bindings, links, 3rd parties helpers/extensions.
New users: go to https://discourse.dearimgui.org for technical support.

Update: the initial version of this release was missing an include that affected compilation on some systems (e.g. Linux, Visual Studio 2008, etc. The include has been added and the release has been retagged shortly after.

TL;DR

  • If you don't have any modification to imgui.cpp you can update with no trouble.
  • If you have ANY modification to imgui.cpp, or intend to make some, please read carefully.
  • If your project/build system doesn't automatically grabs all the *.cpp file when building, add imgui_widgets.cpp to your build list.

What? Didn't I release 1.63 exactly two days ago? Those who read the release note for 1.63 (everyone loves reading release notes, right?) saw it coming... This release has zero functional change but consist in a large refactor were many functions were moved around, a new file imgui_widgets.cpp was added to the source code.

This was something I've been wanting to do for a long time, and in particular I wanted to do it before making the upcoming Docking branch public. The new layout is much saner as functions were all grouped by family and in saner chunks. The Viewport branch has also been updated (~4 hours of rebasing/merging fun).

Changes

  • Moved README, CHANGELOG and TODO files to the docs/ folder.
    If you are updating dear imgui by copying files, remember to delete the old files.
  • Added imgui_widgets.cpp file, extracted and moved widgets code out of imgui.cpp into imgui_widgets.cpp.
    Re-ordered some of the code remaining in imgui.cpp.
    FUNCTIONS HAVE NOT CHANGED. THE CODE IS SEMANTICALLY 100% IDENTICAL, BUT EVERY FUNCTIONS HAS BEEN MOVED.

    Because of this, any local modifications to imgui.cpp will likely conflict when you update.
    If you have any modifications to imgui.cpp, it is suggested that you first update to 1.63, then
    isolate your patches. You can peak at imgui_widgets.cpp from 1.64 to get a sense of what is included in it,
    then separate your changes into several patches that can more easily be applied to 1.64 on a per-file basis.
    What I found worked nicely for me, was to open the diff of the old patches in an interactive merge/diff tool,
    search for the corresponding function in the new code and apply the chunks manually.
  • As a reminder, if you have any change to imgui.cpp it is a good habit to discuss them on the github,
    so a solution applicable on the Master branch can be found. If your company has changes that you cannot
    disclose you may also contact me privately.

Argh

If you are have any issue feels to post/discuss in #2036, there's also a list of commits linked to this issue #.

The refactor has been split in several commits in order to make sure every commit consist of a neat "removed functions here / added functions here" in diff tools, instead of a single commit that would be impossible to decipher.

In addition, the split commits makes it easier to perform a full rebase on Master if you need to, as your conflicts will be isolated. Knowing that functions were only moved makes the manual conflict solving experience a little less painful.

CMake?

If you have any affinity with using CMake, there is a Pull Request #1713 by @podsvirov that implement CMake files to build both the library and examples. In particular, building/linking the examples has been tricky to maintain across all platforms and SDK/library versions so this is helpful. In the future I hope to transition examples/ to use project files generated by cmake and/or premake.

@ocornut ocornut released this Aug 29, 2018 · 109 commits to master since this release

Assets 2

v1.63: Summer heat

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
See https://github.com/ocornut/imgui/wiki for language/framework bindings, links, 3rd parties helpers/extensions.
See https://discourse.dearimgui.org new users technical support.
Scroll below for a gallery of screenshots.

TL;DR;

  • InputText() can easily be bound to std::string-like types using the ImGuiInputTextFlags_CallbackResize flag. Added an optional (not part of core imgui) misc/stl/imgui_stl.h and .cpp wrapper to demonstrate using this flag with std:;string.
  • Nav: Added a new CTRL+TAB window list and changed the highlight system accordingly. [Reminder: Enable Beta keyboard navigation with io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;].
  • Various fixes and improvements to the Drag and Drop system.
  • Examples: Added a Metal renderer (imgui_impl_metal.mm) by @warrenm.
  • Examples: Added an early/experimental raw OSX platform backend (imgui_impl_osx.mm) by @Pagghiu @itamago @ocornut. This is a bit incomplete and not super useful as GLFW/SDL-based multi-platform back-ends are often preferable, but one aim is to build toward nicer native OSX+iOS examples (example_apple_metal/ currently compiles for iOS as well).
  • Examples: Made the OpenGL example support more versions of OpenGL out of the box, as well as ES 3.0 and WebGL for empscripten (and probably ES 2.0 will minor tweaks).
  • Created https://discourse.dearimgui.org, a discourse forum to transition technical support for new users of the library (question pertaining to compiling/linking/binding/inputs/rendering/fonts will progressively be redirected there). If you have time to check this forum from time to time, please do! Thanks to Discourse for providing free hosting for the project!
  • Dozens of other fixes and additions!
  • This is the 50th tagged release of dear imgui!

ctrl_tab

Thank you

Ongoing work on dear imgui is currently being sponsored by Blizzard Entertainment as well as dozens of individual users, hobbyists and studios on Patreon. See the Readme for details and a more complete list. Huge thank you to all of you, past and present supporters! You help is very meaningful and useful.

How to update

NB: prefer checking out the latest version from master. The library is fairly stable and issues/regressions are being fixed fast when reported.

Overwrite every file except imconfig.h (if you modified it). Read the Breaking Changes section below, and the corresponding log in imgui.cpp. If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it. Please report any issue to the GitHub page (or on Twitter).

The previous release (1.62) had the examples binding reorganized. If you are updating from version older than 1.62, you may take the chance to update update your bindings and consider using unmodified bindings for some aspects of your engine integration (e.g. use unmodified versions of imgui_impl_win32.cpp, or imgui_impl_glfw.cpp). The advantage of doing so is that you will benefit from multi-viewport support added to standard bindings as we move toward imgui 1.70. Note that your existing bindings and integration should still work either.

You can also enable IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h to forcefully disable legacy names and symbols. Doing it every once in a while is a good way to make sure you are not using obsolete stuff. Dear ImGui is actively being developed and API changes have a little more frequent lately. They are carefully documented and should not affect everyone. Keeping your copy of dear imgui updated is recommended!

Breaking Changes

  • Style: Renamed ImGuiCol_ModalWindowDarkening to ImGuiCol_ModalWindowDimBg for consistency with other features. Kept redirection enum (will obsolete).
  • Changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecision over time.
  • Removed per-window ImGuiWindowFlags_ResizeFromAnySide Beta flag in favor io.ConfigResizeWindowsFromEdges=true to enable the feature globally. (#1495)
    The feature is not currently enabled by default because it is not satisfying enough, but will eventually be.
  • InputText: Renamed ImGuiTextEditCallback to ImGuiInputTextCallback, ImGuiTextEditCallbackData to ImGuiInputTextCallbackData for consistency. Kept redirection types (will obsolete).
  • InputText: Removed ImGuiTextEditCallbackData::ReadOnly since it is a duplication of (ImGuiTextEditCallbackData::Flags & ImGuiInputTextFlags_ReadOnly).
  • Renamed IsItemDeactivatedAfterChange() to IsItemDeactivatedAfterEdit() for consistency with new IsItemEdited() API.
    Kept redirection function (will obsolete soonish as IsItemDeactivatedAfterChange() is very recent).
  • Renamed io.OptCursorBlink to io.ConfigCursorBlink, io.OptMacOSXBehaviors toio.ConfigMacOSXBehaviors` for consistency. (#1427, #473)
  • Removed obsolete redirection functions: CollapsingHeader() variation with 2 bools - marked obsolete in v1.49, May 2016.

Other Changes

Reading a Changelog is definitively not fun! However, by reading this you will likely learn about both old and new functionalities that may be useful to you.

  • ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
  • ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned vertically properly.
  • Nav: Added a CTRL+TAB window list and changed the highlight system accordingly. The change is motivated by upcoming Docking features. (#787)
  • Nav: Made CTRL+TAB skip menus + skip the current navigation window if is has the ImGuiWindow_NoNavFocus set. (#787) While it was previously possible, you won't be able to CTRL-TAB out and immediately back in a window with the ImGuiWindow_NoNavFocus flag.
  • Window: Allow menu and popups windows from ignoring the style.WindowMinSize values so short menus/popups are not padded. (#1909)
  • Window: Added global io.ConfigResizeWindowsFromEdges option to enable resizing windows from their edges and from the lower-left corner. (#1495)
  • Window: Collapse button shows hovering highlight + clicking and dragging on it allows to drag the window as well.
  • Added IsItemEdited() to query if the last item modified its value (or was pressed). This is equivalent to the bool returned by most widgets. It is useful in some situation e.g. using InputText() with ImGuiInputTextFlags_EnterReturnsTrue. (#2034)
  • InputText: Added support for buffer size/capacity changes via the ImGuiInputTextFlags_CallbackResize flag. (#2006, #1443, #1008).
  • InputText: Fixed not tracking the cursor horizontally when modifying the text buffer through a callback.
  • InputText: Fixed minor off-by-one issue when submitting a buffer size smaller than the initial zero-terminated buffer contents.
  • InputText: Fixed a few pathological crash cases on single-line InputText widget with multiple millions characters worth of contents. Because the current text drawing function reserve for a worst-case amount of vertices and how we handle horizontal clipping, we currently just avoid displaying those single-line widgets when they are over a threshold of 2 millions characters, until a better solution is found.
  • Drag and Drop: Fixed an incorrect assert when dropping a source that is submitted after the target (bug introduced with 1.62 changes related to the addition of IsItemDeactivated()). (#1875, #143)
  • Drag and Drop: Fixed ImGuiDragDropFlags_SourceNoDisableHover to affect hovering state prior to calling IsItemHovered() + fixed description. (#143)
  • Drag and Drop: Calling BeginTooltip() between a BeginDragSource()/EndDragSource() or BeginDropTarget()/EndDropTarget() uses adjusted tooltip settings matching the one created when calling BeginDragSource() without the ImGuiDragDropFlags_SourceNoPreviewTooltip flag. (#143)
  • Drag and Drop: Payload stays available and under the mouse if the source stops being submitted, however the tooltip is replaced by "...". (#1725)
  • Drag and Drop: Added ImGuiDragDropFlags_SourceAutoExpirePayload flag to force payload to expire if the source stops being submitted. (#1725, #143).
  • IsItemHovered(): Added ImGuiHoveredFlags_AllowWhenDisabled flag to query hovered status on disabled items. (#1940, #211)
  • Selectable: Added ImGuiSelectableFlags_Disabled flag in the public API. (#211)
  • ColorEdit4: Fixed a bug when text input or drag and drop leading to unsaturated HSV values would erroneously alter the resulting color. (#2050)
  • Misc: Added optional misc/stl/imgui_stl.h wrapper to use with STL types (e.g. InputText with std::string). (#2006, #1443, #1008)
  • Misc: Added IMGUI_VERSION_NUM for easy compile-time testing. (#2025)
  • Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
  • Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
  • Made assertion more clear when trying to call Begin() outside of the NewFrame()..EndFrame() scope. (#1987)
  • Fixed assertion when transitioning from an active ID to another within a group, affecting ColorPicker (broken in 1.62). (#2023, #820, #956, #1875).
  • Fixed PushID() from keeping alive the new ID Stack top value (if a previously active widget shared the ID it would be erroneously kept alive).
  • Fixed horizontal mouse wheel not forwarding the request to the parent window if ImGuiWindowFlags_NoScrollWithMouse is set. (#1463, #1380, #1502)
  • Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
  • ImDrawList: Improved handling for worst-case vertices reservation policy when large amount of text (e.g. 1+ million character strings) are being submitted in a single call. It would typically have crashed InputTextMultiline(). (#200)
  • OS/Windows: Fixed missing ImmReleaseContext() call in the default Win32 IME handler. (#1932) [@vby]
  • Metrics: Changed io.MetricsActiveWindows to reflect the number of active windows (!= from visible windows), which is useful for lazy/idle render mechanisms as new windows are typically not visible for one frame.
  • Metrics: Added io.MetricsRenderWindow to reflect the number of visible windows.
  • Metrics: Added io.MetricsActiveAllocations, moving away from the cross-context global counters than we previously used. (#1565, #1599, #586)
  • Demo: Added basic Drag and Drop demo. (#143)
  • Demo: Modified the Console example to use InsertChars() in the input text callback instead of poking directly into the buffer. Although this won't make a difference in the example itself, using InsertChars() will honor the resizing callback properly. (#2006, #1443, #1008).
  • Demo: Clarified the use of IsItemHovered()/IsItemActive() right after being in the "Active, Focused, Hovered & Focused Tests" section.
  • Examples: Tweaked the main.cpp of each example.
  • Examples: Metal: Added Metal rendering backend. (#1929, #1873) [@warrenm]
  • Examples: OSX: Added early raw OSX platform backend. (#1873) [@Pagghiu, @itamago, @ocornut]
  • Examples: Added mac OSX & iOS + Metal example in example_apple_metal/. (#1929, #1873) [@warrenm]
  • Examples: Added mac OSX + OpenGL2 example in example_apple_opengl2/. (#1873)
  • Examples: OpenGL3: Added shaders more versions of GLSL. (#1938, #1941, #1900, #1513, #1466, etc.)
  • Examples: OpenGL3: Tweaked the imgui_impl_opengl3.cpp to work as-is with Emscripten + WebGL 2.0. (#1941). [@o-micron]
  • Examples: OpenGL3: Made the example app default to GL 3.0 + GLSL 130 (instead of GL 3.2 + GLSL 150) unless on Mac.
  • Examples: OpenGL3: Added error output when shaders fail to compile/link.
  • Examples: OpenGL3: Added support for glew and glad OpenGL loaders out of the box. (#2001, #2002) [@jdumas]
  • Examples: OpenGL2: Disabling/restoring GL_LIGHTING and GL_COLOR_MATERIAL to increase compatibility with legacy OpenGL applications. (#1996)
  • Examples: DirectX10, DirectX11: Fixed unreleased resources in Init and Shutdown functions. (#1944)
  • Examples: DirectX11: Querying for IDXGIFactory instead of IDXGIFactory1 to increase compatibility. (#1989) [@matt77hias]
  • Examples: Vulkan: Fixed handling of VkSurfaceCapabilitiesKHR::maxImageCount = 0 case. Tweaked present mode selections.
  • Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.

What's next?

I will release 1.64 very soon, where the only difference between 1.63 and 1.64 will be that lots of functions are being moved around. If you do NOT have any local changes to your copy of imgui, both versions will be identical to you. If you DO have local changes, it is strongly advised that you update to 1.63 and isolate your modifications into nice patches. Your modifications will probably conflict in the 1.63->1.64 transitions. However since 1.63->1.64 will only constitute in moved code if you have those neat patches you should be able to reapply them manually.

Modifying imgui.cpp is not discouraged. Remember that you do not need to modify imgui.cpp in order to add new functions into the ImGui:: namespace, you can freely add them from your own file and use <imgui_internal.h> to access internal structures and API.

Still working on multi-viewports and docking. Docking has made great progress since my last update here, to the point where various users have started using the private docking branch to provide feedback. I expect to make the Docking branch public shortly. Also see early attempts at improving the style with gradients, shadows, text color variations.

Gallery

Some of the software spotted since the last release..
You can submit pictures or video of your games/applications using dear imgui!
See more pictures here: #1902 and on the wiki: Software using dear imgui.

Timelapse View for HG (Mercurial) by @jschmidt42
41929826-5218af72-7947-11e8-99b3-a1a7aead9369

Patterns of Life by @armadillu
Patterns of Life

Graphite 3 by @BrunoLevy
graphite_font_awesome

Untitled JRPG tooling by @oxysoft
image

From 22 Racing Series by GOATi
22 racing series

HackEd (Graphical editor for System Shock 1)
4K glory

Blocks (multi-document editor) by @JSandusky
Blocks

@ocornut ocornut released this Jun 22, 2018 · 286 commits to master since this release

Assets 2

v1.62: refactored examples/bindings

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
See https://github.com/ocornut/imgui/wiki for language/framework bindings, links, 3rd parties helpers/extensions.
Scroll below for a gallery of screenshots.

TL;DR;

  • Examples: Bindings have been refactored to ease combining various platforms/renderer and to ease maintenance. This shouldn't affect your existing integration but if you are feeling like it, it would be a good time to update and look at recent changes. Read below for more details.
  • Examples: Added SDL+Vulkan example (which came automatically with the refactor!).
  • Examples: Added a FreeGLUT example (with absolutely no reasonable excuse).
  • Keyboard navigation now supports Page Up/Page Down. (*)
    (Enable keyboard navigation with io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;)
  • Added IsItemDeactivated(), IsItemDeactivatedAfterChange() helpers to facilitate handling of application side undo/redo patterns.
  • Font: Added GlyphMinAdvanceX/GlyphMaxAdvanceX to ImFontConfig to facilitate tweaking the spacing of specific font range (particularly useful for icons). Added a GetGlyphRangesChineseSimplifiedCommon() helper.
  • A dozen of other fixes and additions.

(*) This probably looks simple and minor, but was surprisingly tricky to get right!


Thank you

Ongoing work on dear imgui is currently being sponsored by Blizzard Entertainment as well as dozens of individual users, hobbyists and studios on Patreon. See the readme for details and a more complete list. Huge thank you to all of you, past and present supporters! You help is very meaningful and useful.

How to update

NB: prefer checking out the latest version from master. The library is fairly stable and issues/regressions are being fixed fast when reported.

Overwrite every file except imconfig.h (if you modified it). Read the Breaking Changes section below, and the corresponding log in imgui.cpp. If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it. Please report any issue to the GitHub page (or on Twitter).

This specific update (1.62) had the examples bindings reorganized. You may take the chance at updating your bindings and consider using unmodified bindings for some aspect of your engine integration (e.g. use unmodified versions of imgui_impl_win32.cpp, or imgui_impl_glfw.cpp). The advantage of doing so is that you will benefit from multi-viewport support added to standard bindings as we move toward imgui 1.70. Note that your existing bindings and integration should still work.

You can also enable IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h to forcefully disable legacy names and symbols. Doing it every once in a while is a good way to make sure you are not using obsolete stuff. Dear ImGui is actively being developed and API changes have a little more frequent lately. They are carefully documented and should not affect everyone. Keeping your copy of dear imgui updated is recommended!

Breaking Changes

  • TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was previously set by the code in CollapsingHeader(). The only difference is if you were bypassing CollapsingHeader() and using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly. (#1864)
  • ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)

All Changes

In the examples/ folder:

before: imgui_impl_dx11.cpp        --> after: imgui_impl_win32.cpp + imgui_impl_dx11.cpp
before: imgui_impl_dx12.cpp        --> after: imgui_impl_win32.cpp + imgui_impl_dx12.cpp
before: imgui_impl_glfw_gl3.cpp    --> after: imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp
before: imgui_impl_glfw_vulkan.cpp --> after: imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp
before: imgui_impl_sdl_gl3.cpp     --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl2.cpp
before: imgui_impl_sdl_gl3.cpp     --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp 
etc.
  • Examples back-ends have been refactored to separate the platform code (e.g. Win32, Glfw, SDL2) from the renderer code (e.g. DirectX11, OpenGL3, Vulkan).
    • The "Platform" bindings are in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, etc.
    • The "Renderer" bindings are in charge of: creating the main font texture, rendering imgui draw data.
    • The idea is what we can now easily combine and maintain back-ends and reduce code redundancy. Individual files are smaller and more reusable. Integration of imgui into a new/custom engine may also be easier as there is less overlap between "windowing / inputs" and "rendering" code, so you may study or grab one half of the code and not the other.
    • This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an easy update path to support multi-viewports later (for future ImGui 1.7x).
    • This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings, expect to have to reshuffle a few things.
    • Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
    • Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
    • Read examples/README.txt for more details.
  • Nav: Added support for PageUp/PageDown when keyboard navigation is enabled (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
  • Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
  • Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo and Redo handling patterns. (#820, #956, #1875)
  • Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value. Useful for Undo and Redo handling patterns. Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
  • Drag and Drop: ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEdit3/4 as drag target and ColorButton as drag source. (#1826)
  • Drag and Drop: BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
  • Drag and Drop: BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
  • BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
  • Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
  • InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
  • InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
  • SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
  • ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings. Useful to make a font appears monospaced, particularly useful for icon fonts. Mentioned it in misc/fonts/README file. (#1869)
  • ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
  • Examples: GLFW: Made it possible to Shutdown/Init the back-end again (by reseting the time storage properly). (#1827) [@ice1000]
  • Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
  • Examples: SDL+Vulkan: Added SDL+Vulkan example.
  • Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
  • Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
  • Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
  • Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
  • Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
  • Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
  • Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
  • Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
  • Internals: PushItemFlag() flags are inherited by BeginChild().

What's next?

Still working on multi-viewports and docking. Recent other works also include an imgui_impl_osx.mm for native OSX bindings (need help!), and work on a standardized API for range-selection/multi-selection.

Gallery

Recently spotted. You can submit pictures or video of your games/applications using dear imgui!
See more pictures here: #1607 and on the wiki: Software using dear imgui.

Directus3D
directus3d screenshot-v0 3_preview3

FlexBV (video)
flexbv-side1

Nodable
Nodable

Unravel Two (from a glitch in Electronic Arts conference at E3)
unravel-01

Fallout 76 (from The Making of Fallout 76 - Noclip Documentary)
fallout76

iRacing.com (from technical blog post about their new collision/damage system)
iracing

@ocornut ocornut released this May 14, 2018 · 367 commits to master since this release

Assets 2

NB: prefer checking out the latest version from master. The library is fairly stable and issues/regressions are being fixed fast when reported.

v1.61: data types, in-memory settings, font merging improvement, etc.

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
See https://github.com/ocornut/imgui/wiki for language/framework bindings, links, 3rd parties helpers/extensions.
Scroll below for a gallery of screenshots.


Version 1.61 is out! As promised in the previous update, I'll be trying to push smaller and more frequent releases.

Some of the addition in this version include DragScalar/InputScalar/SliderScalar functions to manipulate variety of data types: float/double, signed/unsigned int/long long etc. properly and without any conversion. In addition, some of the integer widgets that were previously lossy with large integers aren't any more. The new functions are relying on the ImGuiDataType enum to specify the type and are designed for property editors and to minimize the number of additional API entry points. For easy and casual use, the fact that the min/max/step values are passed by address in the generic entry point may be cumbersome. If you frequently use a certain combination of widget/type you may create your own one-line wrappers, e.g.

bool SliderU64(const char *label, u64* value, u64 min = 0, u64 max = 0, const char* format = "%d") 
{ 
    return SliderScalar(label, ImGuiDataType_U64, value, &min, &max, format); 
}

Or infer types automatically using templates, etc. whatever makes better sense in your code base. Dear ImGui is avoiding templates in the public API to increase portability to other languages, but we could later introduce an optional set of helper headers for willing C++ users.

Functions such as LoadIniSettingsFromMemory(), SaveIniSettingsToMemory() have been added to read/write settings from memory instead of relying on file-system functions. You may also use them to seed in default .ini settings for applications where this may be convenient.

Building font atlas has been improved with better support for merging sparse overlapping fonts (such as the new FontAwesome5) and missing glyphs are not taking space in the atlas anymore, which is advantageous when requesting large ranges.

There are a dozen of other changes/fixes which you can find in the full changelog below.

A very unglamorous shot showcasing some data types stuff:

image

Thank you

Ongoing work on dear imgui is currently being sponsored by Blizzard Entertainment as well as many individual users, hobbyists and professionals on Patreon. See the readme for details. Huge thank you to all of you, past and present supporters! You help has been very meaningful.

How to update

Overwrite every file except imconfig.h (if you modified it). Read the Breaking Changes section below, and the corresponding log in imgui.cpp. If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it. Please report any issue to the GitHub page (or on Twitter).

You can also enable IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h to forcefully disable legacy names and symbols. Doing it every once in a while is a good way to make sure you are not using obsolete stuff. Dear ImGui is actively being developed and API changes have a little more frequent lately. They are carefully documented and should not affect everyone. Keeping your copy of dear imgui updated is recommended!

Try to resist the temptation to modify imgui,cpp to not hinder your ability to update often and easily. When needed, you may include imgui_internal.h and implement functions in the ImGui namespace from the comfort of your own files. If you have or need modifications of imgui.cpp, by reaching out you may end up with suggestions for a workaround, or official support for a change.

Breaking Changes

  • DragInt(): The default compile-time format string has been changed from "%.0f" to "%d", as we are not using integers internally any more. If you used DragInt() with custom format strings, make sure you change them to use %d or an integer-compatible format. To honor backward-compatibility, the DragInt() code will currently parse and modify format strings to replace %*f with %d (while preserving leading and trailing decorations) giving time to users to upgrade their code. If you have IMGUI_DISABLE_OBSOLETE_FUNCTIONS enabled, the code will instead assert! You may run a reg-exp search on your codebase for e.g. "DragInt.*%f" to you find them.
  • InputFloat(): Obsoleted InputFloat() functions taking an optional "int decimal_precision" in favor of an equivalent and more flexible "const char* format", consistent with other functions. Kept redirection functions (will obsolete).
  • Misc: IM_DELETE() helper function added in 1.60 doesn't set the input pointer to NULL, more consistent with standard expectation and allows passing r-values.

All Changes

  • Added DragScalar(), DragScalarN(), InputScalar(), InputScalarN(), SliderScalar(), SliderScalarN() with support for signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
  • Window: Fixed pop-ups/tooltips/menus not honoring style.DisplaySafeAreaPadding as well as it should have (part of menus displayed outside the safe area, etc.).
  • Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760)
  • Window: Relaxed the internal stack size checker to allow Push/Begin/Pop/.../End patterns to be used with PushStyleColor, PushStyleVar, PushFont without causing a false positive assert. (#1767)
  • Window: Fixed the default proportional item width lagging by one frame on resize.
  • Columns: Fixed a bug introduced in 1.51 where columns would affect the contents size of their container, often creating feedback loops when ImGuiWindowFlags_AlwaysAutoResize was used. (#1760)
  • Settings: Fixed saving an empty .ini file if CreateContext()/DestroyContext() are called without a single call to NewFrame(). (#1741)
  • Settings: Added LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), SaveIniSettingsToDisk(), SaveIniSettingsToMemory() to manually load/save .ini settings. (#923, #993)
  • Settings: Added io.WantSaveIniSettings flag, which is set to notify the application that e.g. SaveIniSettingsToMemory() should be called. (#923, #993)
  • Scrolling: Fixed a case where using SetScrollHere(1.0f) at the bottom of a window on the same frame the window height has been growing would have the scroll clamped using the previous height. (#1804)
  • MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks]
  • InputText: On Mac OS X, filter out characters when the CMD modifier is held. (#1747) [@sivu]
  • InputText: On Mac OS X, support CMD+SHIFT+Z for Redo. CMD+Y is also supported as major apps seems to default to support both. (#1765) [@lfnoise]
  • InputText: Fixed returning true when edition is canceled with ESC and the current buffer matches the initial value.
  • InputFloat,InputFloat2,InputFloat3,InputFloat4: Added variations taking a more flexible and consistent optional const char* format parameter instead of int decimal_precision. This allow using custom formats to display values in scientific notation, and is generally more consistent with other API. Obsoleted functions using the optional "int decimal_precision" parameter. (#648)
  • DragFloat, DragInt: Cancel mouse tweak when current value is initially past the min/max boundaries and mouse is pushing in the same direction (keyboard/gamepad version already did this).
  • DragFloat, DragInt: Honor natural type limits (e.g. INT_MAX, FLT_MAX) instead of wrapping around. (#708, #320)
  • DragFloat, SliderFloat: Fixes to allow input of scientific notation numbers when using CTRL+Click to input the value. (~#648, #1011)
  • DragFloat, SliderFloat: Rounding-on-write uses the provided format string instead of parsing the precision from the string, which allows for finer uses of %e %g etc. (#648, #642)
  • DragFloat: Improved computation when using the power curve. Improved lost of input precision with very small steps. Added an assert than power-curve requires a min/max range. (~#642)
  • DragFloat: The 'power' parameter is only honored if the min/max parameter are also setup.
  • DragInt, SliderInt: Fixed handling of large integers (we previously passed data around internally as float, which reduced the range of valid integers).
  • ColorEdit: Fixed not being able to pass the ImGuiColorEditFlags_NoAlpha or ImGuiColorEditFlags_HDR flags to SetColorEditOptions().
  • Nav: Fixed hovering a Selectable() with the mouse so that it update the navigation cursor (as it happened in the pre-1.60 navigation branch). (#787)
  • Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than style.FramePadding and has no effect on main menu bar on a computer. (#1439)
  • Fonts: When building font atlas, glyphs that are missing in the fonts are not using the glyph slot to render a dummy/default glyph. Saves space and allow merging fonts with overlapping font ranges such as FontAwesome5 which split out the Brands separately from the Solid fonts. (#1703, #1671)
  • Misc: Added IMGUI_CHECKVERSION() macro to compare version string and data structure sizes in order to catch issues with mismatching compilation unit settings. (#1695, #1769)
  • Misc: Added IMGUI_DISABLE_MATH_FUNCTIONS in imconfig.h to make it easier to redefine wrappers for std/crt math functions.
  • Misc: Fix to allow compiling in unity builds where stb_rectpack/stb_truetype may be already included in the same compilation unit.
  • Demo: Simple Overlay: Added a context menu item to enable freely moving the window.
  • Demo: Added demo for DragScalar(), InputScalar(), SliderScalar(). (#643)
  • Examples: Calling IMGUI_CHECKVERSION() in the main.cpp of every example application.
  • Examples: Allegro 5: Added support for 32-bit indices setup via defining ImDrawIdx, to avoid an unnecessary conversion (Allegro 5 doesn't support 16-bit indices).
  • Examples: Allegro 5: Renamed bindings from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp.
  • Examples: DirectX 9: Saving/restoring Transform because they don't seem to be included in the StateBlock. Setting shading mode to Gouraud. (#1790, #1687) [@sr-tream]
  • Examples: SDL: Fixed clipboard paste memory leak in the SDL binding code. (#1803) [@eliasdaler]
  • Various minor fixes, tweaks, refactoring, comments.

Gallery

Some screenshots submitted since 1.60. Please submit pictures or video of your games/applications using dear imgui! See more pictures here > #1607
Also see: Software-using-dear-imgui.

Harfang3D engine (http://harfang3d.com/)
harfang-201805

Enjon engine by @MrFrenik
progress_shot_04_03_2018

Panorama (https://github.com/ronen25/panorama)
panorama 2

EaseFX
EaseFX

more...

@ocornut ocornut released this Apr 9, 2018 · 479 commits to master since this release

Assets 2

v1.60: Gamepad/Keyboard Navigation, Context Creation and a hundred other changes

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
See https://github.com/ocornut/imgui/wiki for language/framework bindings, links, 3rd parties helpers/extensions.
Scroll below for a gallery of screenshots.

Foreword

Hello 2018!

It looks like I held on too long again, and 1.60 is crammed with changes! If you have the patience and you are well acquainted with imgui, please try to read this Changelog. The information in there will be useful to you (either immediately, either in the future). I promise that 1.61 will have less changes!

The biggest change of this version is that I have merged the long pending Gamepad/Keyboard navigation branch. I had a first jab at Gamepad controls back in July 2016, under the initial impulse of Insomniac, and it ended up taking ten times the amount of time I first imagined it would take. It is finally merged in 1.60 as a Beta feature (needs to be explicitly enabled). I consider it unfinished but it's pretty usable especially on console systems with a gamepad. It will need more users and feedback to improve over time.

This release and ongoing work on dear imgui wouldn't have happened without everyone's monthly support on Patreon. Huge thanks to all of you, past and present patrons! It's been very helpful and meaningful to see this ongoing support, along with as the messages on twitter, e-mail, github.

Great news: Blizzard Entertainment has kindly committed to sponsor and support development of dear imgui, and has been for the past few months now. It will allow me to increasingly focus on dear imgui through the year, and lots of promising features will emerge from this sponsorship. Their wish list is mostly aligned with everyone's interest, with features like docking and multi-viewports (see a gif) but also hundreds of other improvements to the library, several of which already forming the bulk of this 1.60 release. Blizzard have been very supportive and understanding of the situation posed by the development of a shared free software and keeping an active community sane. Thank you Patrick, Marco, Van & others!

On the side, I've been trying to work to provide technical support for game studios using dear imgui. This has been helpful because I get feedback and user stories from different teams, each at different points in their project and adoption of imgui, and this feedback allows me to make better decisions when steering the ship.

Gamepad/Keyboard Navigation

With keyboard navigation you can use/activate most of dear imgui features from the keyboard:

  • ALT to access menus.
  • Arrow keys to move.
  • Space to activate buttons, tweak sliders/drag, tree node, enter into child nodes, etc.
  • Escape to close popups, exit a child window, clear selection.
  • Enter to input text.
  • CTRL-Tab (CTRL-Shift-Tab) to focus windows, etc.

imgui_nav_201802c

Read Changelog below and imgui.cpp for details on how to enable it (io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard, io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad)

Mapping for game controllers:

controls for ps4 controllers

controls for switch controllers
(Click to download PSD/PNG for all 3 major controllers)

Bonus link: a Emscripten+JavaScript+WebGL demo by @flyover, which supports gamepad navigation on the web: https://flyover.github.io/imgui-js/example (click Inputs, Navigation & Focus and enable gamepad there. Keyboard is conflicting a little too much with browser controls it seems?)

How to update

Note that this 1.60 update includes MANY things other than navigation, so even if you don't care for that feature, it is really recommended that you stay up to date.

Overwrite every file except imconfig.h (if you have modified it). Read the Breaking Changes section below, and the corresponding log in imgui.cpp. If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it. Please report any issue to the GitHub page! (or on Twitter).

You can also enable IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h to forcefully disable legacy names and symbols. Doing it every once in a while is a good way to make sure you are not using obsolete stuff. Dear ImGui has resumed active development and API changes have a little more frequent lately. They are carefully documented and should not affect everyone. Keeping your copy of dear imgui updated is recommended!

Try to resist the temptation to modify imgui,cpp to not hinder your ability to update often and easily. When needed, you may include imgui_internal.h and implement functions in the ImGui namespace from the comfort of your own files. If you have or need modifications of imgui.cpp, by reaching out you may end up with suggestions for a workaround, or official support for a change.

Breaking Changes

The addition of ImGui::CreateContext() will affect everyone. Read below (or #1599 for more details).

  • Reorganized context handling to be more explicit: (#1599)
    • YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END.
    • removed Shutdown() function, as DestroyContext() serve this purpose. If you are using an old back-end from the examples/ folder, remove the line that calls Shutdown().
    • you may pass a ImFontAtlas* pointer to CreateContext() to share a font atlas between contexts. Otherwise CreateContext() will create its own font atlas instance.
    • removed allocator parameters from CreateContext(), they are now setup with SetAllocatorFunctions(), and shared by all contexts.
    • removed the default global context and font atlas instance, which made things more confusing for users of DLL reloading and users of multiple contexts.
  • Obsoleted the io.RenderDrawListsFn callback (will completely remove in a few versions), you can call your graphics engine render function after ImGui::Render(). e.g. with example back-ends, call ImDrawData* draw_data = ImGui::GetDrawData(); ImGui_ImplXXXX_RenderDrawData(draw_data).
  • Renamed ImGuiStyleVar_Count_ to ImGuiStyleVar_COUNT and ImGuiMouseCursor_Count_ to ImGuiMouseCursor_COUNT for consistency with other public enums.
  • Fonts: Moved sample TTF files from extra_fonts/ to misc/fonts/. If you loaded files directly from the imgui repo you may need to update your paths.
  • Fonts: changed ImFont::DisplayOffset.y to defaults to 0 instead of +1. Fixed vertical rounding of Ascent/Descent to match TrueType renderer. If you were adding or subtracting (not assigning) to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
  • BeginDragDropSource(): temporarily removed the optional mouse_button=0 parameter because it is not really usable in many situations at the moment.
  • Obsoleted IsAnyWindowHovered() in favor of IsWindowHovered(ImGuiHoveredFlags_AnyWindow). Kept redirection function (will obsolete).
  • Obsoleted IsAnyWindowFocused() in favor of IsWindowFocused(ImGuiFocusedFlags_AnyWindow). Kept redirection function (will obsolete).
  • Renamed io.WantMoveMouse to io.WantSetMousePos for consistency and ease of understanding (was added in 1.52, not used by core, and honored by some binding ahead of merging the Nav branch).
  • Removed ImGuiCol_CloseButton, ImGuiCol_CloseButtonActive, ImGuiCol_CloseButtonHovered style colors as the closing cross uses regular button colors now.
  • Renamed ImGuiSizeConstraintCallback to ImGuiSizeCallback, ImGuiSizeConstraintCallbackData to ImGuiSizeCallbackData.
  • Removed CalcItemRectClosestPoint() which was weird and not really used by anyone except demo code. If you need it it's easy to replicate on your side.

All Changes

  • Doc: Added a Changelog.txt file in the repository to ease comparing versions (it goes back to dear imgui 1.48), until now it was only on GitHub.
  • Navigation: merged in the gamepad/keyboard navigation (about a million changes!). (#787, #323)
    The initial focus was to support game controllers, but keyboard is becoming increasingly and decently usable.
  • To use Gamepad Navigation:
    • User: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable.
    • Backend: Set io.BackendFlags |= ImGuiBackendFlags_HasGamepad + fill the io.NavInputs[] fields before calling NewFrame(). Read imgui.cpp for more details.
    • See #1599 for recommended gamepad mapping or download PNG/PSD at http://goo.gl/9LgVZW
    • See enum ImGuiNavInput_ in imgui.h for a description of inputs. Read imgui.cpp for more details.
  • To use Keyboard Navigation:
    • Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeyDown[] + io.KeyMap[] arrays.
  • Basic controls: arrows to navigate, Space to activate and tweak items, ALT to enter menus, Enter to edit text, Escape to cancel/close, Ctrl-Tab to focus windows, etc.
    • When keyboard navigation is active (io.NavActive + ImGuiConfigFlags_NavEnableKeyboard), the io.WantCaptureKeyboard flag will be set. For more advanced uses, you may want to read from io.NavActive or io.NavVisible. Read imgui.cpp for more details.
  • Navigation: SetItemDefaultFocus() sets the navigation position in addition to scrolling. (#787)
  • Navigation: Added IsItemFocused(), added IsAnyItemFocused(). (#787)
  • Navigation: Added window flags: ImGuiWindowFlags_NoNav (== ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus).
  • Navigation: Style: Added ImGuiCol_NavHighlight, ImGuiCol_NavWindowingHighlight colors. (#787)
  • Navigation: TreeNode: Added ImGuiTreeNodeFlags_NavLeftJumpsBackHere flag to allow Nav Left direction to jump back to parent tree node from any of its child. (#1079)
  • Navigation: IO: Added io.ConfigFlags (input), io.NavActive (output), io.NavVisible (output). (#787)
  • Context: Removed the default global context and font atlas instances, which caused various problems to users of multiple contexts and DLL users. (#1565, #1599). YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END. Existing apps will assert/crash without it.
  • Context: Added SetAllocatorFunctions() to rewire memory allocators (as a replacement to previous parameters to CreateContext()). Allocators are shared by all contexts and imgui helpers. (#1565, #586, #992, #1007, #1558)
  • Context: You may pass a ImFontAtlas to CreateContext() to specify a font atlas to share. Shared font atlas are not owned by the context and not destroyed along with it. (#1599)
  • Context: Added IMGUI_DISABLE_DEFAULT_ALLOCATORS to disable linking with malloc/free. (#1565, #586, #992, #1007, #1558)
  • IO: Added io.ConfigFlags for user application to store settings for imgui and for the back-end:
    • ImGuiConfigFlags_NavEnableKeyboard: Enable keyboard navigation.
    • ImGuiConfigFlags_NavEnableGamepad: Enable gamepad navigation (provided ImGuiBackendFlags_HasGamepad is also set by back-end).
    • ImGuiConfigFlags_NavEnableSetMousePos: Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward.
    • ImGuiConfigFlags_NoMouseCursorChange: Instruct back-end to not alter mouse cursor shape and visibility (by default the example back-end use mouse cursor API of the platform when available)
    • ImGuiConfigFlags_NoMouse: Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information passed by the back-end.
    • ImGuiConfigFlags_IsSRGB, ImGuiConfigFlags_IsTouchScreen: Flags for general application use.
  • IO: Added io.BackendFlags for back-end to store its capabilities (currently: _HasGamepad, _HasMouseCursors, _HasSetMousePos). This will be used more in the next version.
  • IO: Added ImGuiKey_Insert, ImGuiKey_Space keys. Setup in all example bindings. (#1541)
  • IO: Added Horizontal Mouse Wheel support for horizontal scrolling. (#1463) [@tseeker]
  • IO: Added IsAnyMouseDown() helper which is helpful for bindings to handle mouse capturing.
  • Window: Clicking on a window with the ImGuiWIndowFlags_NoMove flags takes an ActiveId so we can't hover something else when dragging afterwards. (#1381, #1337)
  • Window: IsWindowHovered(): Added ImGuiHoveredFlags_AnyWindow, ImGuiFocusedFlags_AnyWindow flags (See Breaking Changes). Added to demo. (#1382)
  • Window: Added SetNextWindowBgAlpha() helper. Particularly helpul since the legacy 5-parameters version of Begin() has been marked as obsolete in 1.53. (#1567)
  • Window: Fixed SetNextWindowContentSize() with 0.0f on Y axis (or SetNextWindowContentWidth()) overwriting the contents size. Got broken on Dec 10 (1.53). (#1363)
  • ArrowButton: Added ArrowButton() given a cardinal direction (e.g. ImGuiDir_Left).
  • InputText: Added alternative clipboard shortcuts: Shift+Delete (cut), Ctrl+Insert (copy), Shift+Insert (paste). (#1541)
  • InputText: Fixed losing Cursor X position when clicking outside on an item that's submitted after the InputText(). It was only noticeable when restoring focus programmatically. (#1418, #1554)
  • InputText: Added ImGuiInputTextFlags_CharsScientific flag to also allow 'e'/'E' for input of values using scientific notation. Automatically used by InputFloat.
  • Style: Default style is now StyleColorsDark(), instead of the old StyleColorsClassic(). (#707)
  • Style: Enable window border by default. (#707)
  • Style: Exposed ImGuiStyleVar_WindowTitleAlign, ImGuiStyleVar_ScrollbarSize, ImGuiStyleVar_ScrollbarRounding, ImGuiStyleVar_GrabRounding + added an assert to reduce accidental breakage. (#1181)
  • Style: Added style.MouseCursorScale help when using the software mouse cursor facility. (#939).
  • Style: Close button nows display a cross before hovering. Fixed cross positioning being a little off. Uses button colors for highlight when hovering. (#707)
  • Popup: OpenPopup() Always reopen existing popup. (Removed imgui_internal.h's OpenPopupEx() which was used for this.) (#1497, #1533).
  • Popup: BeginPopupContextItem(), BeginPopupContextWindow(), BeginPopupContextVoid(), OpenPopupOnItemClick() all react on mouse release instead of mouse press. (~#439)
  • Popup: Better handling of user mistakenly calling OpenPopup() every frame (with reopen_existing option). The error will now be more visible and easier to understand. (#1497)
  • Popup: BeginPopup(): Exposed extra_flags parameter that are passed through to Begin(). (#1533)
  • Popup: BeginPopupModal: fixed the conditional test for SetNextWindowPos() which was polling the wrong window, which in practice made the test succeed all the time.
  • Tooltip: BeginTooltip() sets ImGuiWindowFlags_NoInputs flag.
  • Scrollbar: Fixed ScrollbarY enable test after ScrollbarX has been enabled being a little off (small regression from Nov 2017). (#1574)
  • Scrollbar: Fixed ScrollbarX enable test subtracting WindowPadding.x (this has been there since the addition of horizontal scroll bar!).
  • Columns: Clear offsets data when columns count changed. (#1525)
  • Columns: Fixed a memory leak of ImGuiColumnsSet's Columns vector. (#1529) [@unprompted]
  • Columns: Fixed resizing a window very small breaking some columns positioning (broken in 1.53).
  • Columns: The available column extent takes consideration of the right-most clipped pixel, so the right-most column may look a little wider but will contain the same amount of visible contents.
  • MenuBar: Fixed menu bar pushing a clipping rect outside of its allocated bound (usually unnoticeable).
  • TreeNode: nodes with the ImGuiTreeNodeFlags_Leaf flag correctly disable highlight when DragDrop is active. (#143, #581)
  • Drag and Drop: Increased payload type string to 32 characters instead of 8. (#143)
  • Drag and Drop: TreeNode as drop target displays rectangle over full frame. (#1597, #143)
  • DragFloat: Fix/workaround for backends which do not preserve a valid mouse position when dragged out of bounds. (#1559)
  • InputFloat: Allow inputing value using scientific notation e.g. "1e+10".
  • InputDouble: Added InputDouble() function. We use a format string instead of a decimal_precision parameter to also for "%e" and variants. (#1011)
  • Slider, Combo: Use ImGuiCol_FrameBgHovered color when hovered. (#1456) [@stfx]
  • Combo: BeginCombo(): Added ImGuiComboFlags_NoArrowButton to disable the arrow button and only display the wide value preview box.
  • Combo: BeginCombo(): Added ImGuiComboFlags_NoPreview to disable the preview and only display a square arrow button.
  • Combo: Arrow button isn't displayed over frame background so its blended color matches other buttons. Left side of the button isn't rounded.
  • PlotLines: plot a flat line if scale_min==scale_max. (#1621)
  • Fonts: Changed ImFont::DisplayOffset.y to defaults to 0 instead of +1. Fixed rounding of Ascent/Descent to match TrueType renderer. If you were adding or subtracting (not assigning) to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
  • Fonts: Updated stb_truetype from 1.14 to stb_truetype 1.19. (w/ include fix from some platforms #1622)
  • Fonts: Added optional FreeType rasterizer in misc/freetype. Moved from imgui_club repo. (#618) [@Vuhdo, @mikesart, @ocornut]
  • Fonts: Moved extra_fonts/ to misc/fonts/.
  • ImFontAtlas: Fixed cfg.MergeMode not reusing existing glyphs if available (always overwrote).
  • ImFontAtlas: Handle stb_truetype stbtt_InitFont() and stbtt_PackBegin() possible failures more gracefully, GetTexDataAsRGBA32() won't crash during conversion. (#1527)
  • ImFontAtlas: Moved mouse cursor data out of ImGuiContext, fix drawing them with multiple contexts. Also remove the last remaining undesirable dependency on ImGui in imgui_draw.cpp. (#939)
  • ImFontAtlas: Added ImFontAtlasFlags_NoPowerOfTwoHeight flag to disable padding font height to nearest power of two. (#1613)
  • ImFontAtlas: Added ImFontAtlasFlags_NoMouseCursors flag to disable baking software mouse cursors, mostly to save texture memory on very low end hardware. (#1613)
  • ImDrawList: Fixed AddRect() with anti-aliasing disabled (lower-right corner pixel was often missing, rounding looks a little better.) (#1646)
  • ImDrawList: Added ImDrawList::CloneOutput() helper to facilitate the cloning of ImDrawData or ImDrawList for multi-threaded rendering.
  • Misc: Functions passed to libc qsort are explicitly marked cdecl to support compiling with vectorcall as the default calling convention. (#1230, #1611) [@RandyGaul]
  • Misc: ImVec2: added [] operator. This is becoming desirable for some code working of either axes independently. Better adding it sooner than later.
  • Misc: NewFrame(): Added an assert to detect incorrect filling of the io.KeyMap[] array earlier. (#1555)
  • Misc: Added IM_OFFSETOF() helper in imgui.h (previously was in imgui_internal.h)
  • Misc: Added obsolete redirection function GetItemsLineHeightWithSpacing() (which redirects to GetFrameHeightWithSpacing()), as intended and stated in docs of 1.53.
  • Misc: Added misc/natvis/imgui.natvis for visual studio debugger users to easily visualize imgui internal types. Added to examples projects.
  • Misc: Added IMGUI_USER_CONFIG to define a custom configuration filename. (#255, #1573, #1144, #41)
  • Misc: Added IMGUI_STB_TRUETYPE_FILENAME and IMGUI_STB_RECT_PACK_FILENAME compile time directives to use another version of the stb_ files.
  • Misc: Updated stb_rect_pack from 0.10 to 0.11 (minor changes).
    (Those flags are not used by ImGui itself, they only exists to make it easy for the engine/back-end to pass information to the application in a standard manner.)
  • Metrics: Added display of Columns state.
  • Demo: Improved Selectable() examples. Improved BeginCombo() examples. (#1528)
  • Demo: Tweaked the Child demos, added a menu bar to the second child to test some navigation functions.
  • Demo: Console: Using ImGuiCol_Text to be more friendly to color changes.
  • Demo: Using IM_COL32() instead of ImColor() in ImDrawList centric contexts. Trying to phase out use of the ImColor helper whenever possible.
  • Examples: Files in examples/ now include their own changelog so it is easier to occasionally update your bindings if needed.
  • Examples: Using Dark theme by default. (#707). Tweaked demo code.
  • Examples: Added support for horizontal mouse wheel for API that allows it. (#1463) [@tseeker]
  • Examples: All examples now setup the io.BackendFlags to signify they can honor mouse cursors, gamepad, etc.
  • Examples: DirectX12: Added DirectX 12 example. (#301) [@jdm3]
  • Examples: OpenGL3+GLFW,SDL: Changed GLSL shader version from 330 to 150. (#1466, #1504)
  • Examples: OpenGL3+GLFW,SDL: Added a way to override the GLSL version string in the Init function. (#1466, #1504).
  • Examples: OpenGL3+GLFW,SDL: Creating VAO in the render function so it can be more easily used by multiple shared OpenGL contexts. (#1217)
  • Examples: OpenGL3+GLFW: Using 3.2 context instead of 3.3. (#1466)
  • Examples: OpenGL: Setting up glPixelStorei() explicitly before uploading texture.
  • Examples: OpenGL: Calls to glPolygonMode() are casting parameters as GLEnum to not fail with more strict bindings. (#1628) [@ilia-glushchenko]
  • Examples: Win32 (DirectX9,10,11,12): Added support for mouse cursor shapes. (#1495)
  • Examples: Win32 (DirectX9,10,11,12: Support for windows using the CS_DBLCLKS class flag by handling the double-click messages (WM_LBUTTONDBLCLK etc.). (#1538, #754) [@ndandoulakis]
  • Examples: Win32 (DirectX9,10,11,12): Made the Win32 proc handlers not assert if there is no active context yet, to be more flexible with creation order. (#1565)
  • Examples: GLFW: Added support for mouse cursor shapes (the diagonal resize cursors are unfortunately not supported by GLFW at the moment. (#1495)
  • Examples: GLFW: Don't attempt to change the mouse cursor input mode if it is set to GLFW_CURSOR_DISABLED by the application. (#1202) [@PhilCK]
  • Examples: SDL: Added support for mouse cursor shapes. (#1626) [@olls]
  • Examples: SDL: Using SDL_CaptureMouse() to retrieve coordinates outside of client area when dragging (SDL 2.0.4+ only, otherwise using SDL_WINDOW_INPUT_FOCUS instead of previously SDL_WINDOW_MOUSE_FOCUS). (#1559)
  • Examples: SDL: Enabled vsync by default so people don't come at us with demoes running at 2000 FPS burning a cpu core.
  • Examples: SDL: Using SDL_GetPerformanceCounter() / SDL_GetPerformanceFrequency() to handle framerate over 1000 FPS properly. (#996)
  • Examples: SDL: Using scancode exclusively instead of a confusing mixture of scancodes and keycodes.
  • Examples: SDL: Visual Studio: Added .vcxproj file. Using %SDL2_DIR% in the default .vcxproj and build files instead of %SDL_DIR%, the earlier being more standard.
  • Examples: Vulkan: Visual Studio: Added .vcxproj file.
  • Examples: Apple: Fixed filenames in OSX xcode project. Various other Mac friendly fixes. [@gerryhernandez etc.]
  • Examples: Visual Studio: Disabled extraneous function-level check in Release build.
  • Various fixes, tweaks, internal refactoring, optimizations, comments.

Roadmap

Some of the features hopefully coming in 2018..

  • Polish/improve the gamepad and keyboard controls. (#787)
  • Finish and merge work on multi-viewports and platform windows. (#1542)
  • Finish and merge work an official implementation of docking, tabs. (#351)
  • Better/easier support for hi-dpi and multiple simultaneous dpi for the multi-viewports features.
  • Refactor the example back-end and applications along with how they are built.
  • Make columns/tables better (they are currently pretty terrible).
  • Start adding a testing suite to imgui (perhaps in a separate repository) (

Gallery

Some screenshots submitted since 1.53. Please submit pictures or video of your games/applications using dear imgui! See more pictures here > #1607
Also see: Software-using-dear-imgui.

VectorayGen by @jangalomph (https://jangafx.com)
vectoraygen tutorial 1

Intel RealSense Viewer (https://github.com/IntelRealSense/librealsense, https://realsense.intel.com/sdk-2)
rs_d415_pointcloud_lg

BASIC8 by @paladin-t (https://paladin-t.github.io/b8, http://store.steampowered.com/app/767240/BASIC8/)
BASIC8

Graphite by @BrunoLevy (http://alice.loria.fr/software/graphite/doc/html)
fourshadertoys
more...

SdfMesher by @aiekick
dans6hqwsaavore jpg orig

Demo tooling by @citruslee
minerva-04
more...

@ocornut ocornut released this Dec 25, 2017 · 1362 commits to master since this release

Assets 2

NB: prefer checking out the latest version from master. The library is fairly stable and issues/regressions are being fixed fast when reported.

v1.53: BeginCombo(), default styles, drag and drop and a hundred other changes.

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
See https://github.com/ocornut/imgui/wiki for language/framework bindings, links, 3rd parties helpers/extensions.
Scroll below for a gallery of screenshots.

Short version:

  • Cleaned and obsoleted a few functions/enums, most of them uncommon (pleased read Breaking Changes below).
  • A new BeginCombo/EndCombo simpler and more flexible API allowing you to create combo boxes with any type of contents, not relying on indices for selection or lambdas to access your data.
  • A new beta API for drag and dropping data between imgui widgets.
  • Style: Helpers functions such as StyleColorsDark() to use different default styles. The classic style also has been tweaked. Border are now part of Style, obsoleting the old/awkward ImGuiWindowFlags_ShowBorder flag. The style editor now expose the most-common settings more clearly. Added ShowStyleSelector(), ShowFontSelector() helpers.
  • Hopefully fixed the remaining issues with scrollbar flickering when using certain sizing/placement patterns incl. common patterns with BeginChild().
  • Added flags to IsItemHovered(), IsWindowHovered(), IsWindowFocused() allowing to handle more complex types of interactions (e.g. for drag and drop) and supporting features that used to require different function calls.
  • More than 100 other small or medium features and fixes (see full list below).

imgui_v153_style_editor

imgui_v153_drag_and_drop

imgui_v153_styles

Large features such as Docking are still being developed in a private branch but not ready for release yet (will aim to publish it into a public Beta branch when they are good and stable enough). In addition, the Beta navigation branch is in sync with master and has received various improvements since the past release.

Support future development of dear imgui

Recent developments of Dear ImGui has been kindly sponsored by a private game studio + by individual users through Patreon. If your company is using dear imgui, please consider financial support (e.g. sponsoring a few weeks/months of development, technical support contract) to sustain the long term future of this library. Your contributions are always welcome and allows me to keep support and development ongoing. See Readme for details and contact info.

How to update

Overwrite every file except imconfig.h (if you have modified it). Read the Breaking Changes section below, and the corresponding log in imgui.cpp. If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it. Please report any issue to the GitHub page! (or on Twitter).

You can also enable IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h to forcefully disable legacy names and symbols. Doing it every once in a while is a good way to make sure you are not using obsolete stuff. Dear ImGui has resumed active development and API changes have a little more frequent lately. They are carefully documented and should not affect everyone. Keeping your copy of dear imgui updated is recommended!

Breaking Changes

Moving forward with our incremental fixes and cleanups..

  • Renamed the emblematic ShowTestWindow() function to ShowDemoWindow(). Kept redirection function (will obsolete).
  • Renamed GetItemsLineHeightWithSpacing() to GetFrameHeightWithSpacing() for consistency. Kept redirection function (will obsolete).
  • Renamed ImGuiTreeNodeFlags_AllowOverlapMode flag to ImGuiTreeNodeFlags_AllowItemOverlap. Kept redirection enum (will obsolete).
  • Obsoleted IsRootWindowFocused() in favor of using IsWindowFocused(ImGuiFocusedFlags_RootWindow). Kept redirection function (will obsolete). (#1382)
  • Obsoleted IsRootWindowOrAnyChildFocused() in favor of using IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows). Kept redirection function (will obsolete). (#1382)
  • Obsoleted IsRootWindowOrAnyChildHovered() in favor of using IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows). Kept redirection function (will obsolete). (#1382)
  • Obsoleted SetNextWindowContentWidth() in favor of usingSetNextWindowContentSize()`. Kept redirection function (will obsolete).
  • Renamed ImGuiTextBuffer::append() helper to appendf(), and appendv() to appendfv() for consistency. If you copied the 'Log' demo in your code, it uses appendv() so that needs to be renamed.
  • ImDrawList: Removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Prefer manipulating ImDrawList::Flags if you need to toggle them during the frame.
  • Style, ImDrawList: Renamed style.AntiAliasedShapes to style.AntiAliasedFill for consistency and as a way to explicitly break code that manipulate those flag at runtime. You can now manipulate ImDrawList::Flags.
  • Style, Begin: Removed ImGuiWindowFlags_ShowBorders window flag. Borders are now fully set up in the ImGuiStyle structure (see e.g. style.FrameBorderSize, style.WindowBorderSize). Use ImGui::ShowStyleEditor() to look them up.
    Please note that the style system will keep evolving (hopefully stabilizing in Q1 2018), and so custom styles will probably subtly break over time.
    It is recommended that you use the StyleColorsClassic(), StyleColorsDark(), StyleColorsLight() functions. Also see ShowStyleSelector().
  • Style: Removed ImGuiCol_ComboBg in favor of combo boxes using ImGuiCol_PopupBg for consistency. Combo are normal popups.
  • Style: Renamed ImGuiCol_ChildWindowBg to ImGuiCol_ChildBg.
  • Style: Renamed style.ChildWindowRounding to style.ChildRounding, ImGuiStyleVar_ChildWindowRounding to ImGuiStyleVar_ChildRounding.
  • Removed obsolete redirection functions: SetScrollPosHere() - marked obsolete in v1.42, July 2015.
  • Removed obsolete redirection functions: GetWindowFont(), GetWindowFontSize() - marked obsolete in v1.48, March 2016.

All Changes

  • Added io.OptCursorBlink option to allow disabling cursor blinking. (#1427)
  • Added GetOverlayDrawList() helper to quickly get access to a ImDrawList that will be rendered in front of every windows.
  • Added GetFrameHeight() helper which returns (FontSize + style.FramePadding.y * 2).
  • DragDrop: Added Beta API to easily use drag and drop patterns between imgui widgets.
    • Setup a source on a widget with BeginDragDropSource(), SetDragDropPayload(), EndDragDropSource() functions.
    • Receive data with BeginDragDropTarget(), AcceptDragDropPayload(), EndDragDropTarget().
    • See ImGuiDragDropFlags for various options.
    • The ColorEdit4() and ColorButton() widgets now support Drag and Drop.
    • The API is tagged as Beta as it still may be subject to small changes.
  • DragDrop: When drag and drop is active, tree nodes and collapsing header can be opened by hovering on them for 0.7 seconds.
  • Renamed io.OSXBehaviors to io.OptMacOSXBehaviors. Should not affect users as the compile-time default is usually enough. (#473, #650)
  • Style: Added StyleColorsDark() style. (#707) [@dougbinks]
  • Style: Added StyleColorsLight() style. Best used with frame borders + thicker font than the default font. (#707)
  • Style: Added style.PopupRounding setting. (#1112)
  • Style: Added style.FrameBorderSize, style.WindowBorderSize. Removed ImGuiWindowFlags_ShowBorders window flag! Borders are now fully set up in the ImGuiStyle structure. Use ImGui::ShowStyleEditor() to look them up. (#707, fix #819, #1031)
  • Style: Various small changes to the classic style (most noticeably, buttons are now using blue shades). (#707)
  • Style: Renamed ImGuiCol_ChildWindowBg to ImGuiCol_ChildBg.
  • Style: Renamed style.ChildWindowRounding to style.ChildRounding, ImGuiStyleVar_ChildWindowRounding to ImGuiStyleVar_ChildRounding.
  • Style: Removed ImGuiCol_ComboBg in favor of combo boxes using ImGuiCol_PopupBg for consistency. (#707)
  • Style: Made the ScaleAllSizes() helper rounds down every values so they are aligned on integers.
  • Focus: Added SetItemDefaultFocus(), which in the current (master) branch behave the same as doing if (IsWindowAppearing()) SetScrollHere(), however in the navigation branch this will also set the default focus. Prefer using this when creating combo boxes with BeginCombo() so your code will be forward-compatible with gamepad/keyboard navigation features. (#787)
  • Combo: Popup grows horizontally to accomodate for contents that is larger then the parent combo button.
  • Combo: Added BeginCombo()/EndCombo() API which allows use to submit content of any form and manage your selection state without relying on indices.
  • Combo: Added ImGuiComboFlags_PopupAlignLeft flag to BeginCombo() to prioritize keeping the popup on the left side (for small-button-looking combos).
  • Combo: Added ImGuiComboFlags_HeightSmall, ImGuiComboFlags_HeightLarge, ImGuiComboFlags_HeightLargest to easily provide desired popup height.
  • Combo: You can use SetNextWindowSizeConstraints() before BeginCombo() to specify specific popup width/height constraints.
  • Combo: Offset popup position by border size so that a double border isn't so visible. (#707)
  • Combo: Recycling windows by using a stack number instead of a unique id, wasting less memory (like menus do).
  • InputText: Added ImGuiInputTextFlags_NoUndoRedo flag. (#1506, #1508) [@ibachar]
  • Window: Fixed auto-resize allocating too much space for scrollbar when SizeContents is bigger than maximum window size (fixes c0547d3). (#1417)
  • Window: Child windows with MenuBar use regular WindowPadding.y so layout look consistent as child or as a regular window.
  • Window: Begin(): Fixed appending into a child window with a second Begin() from a different window stack querying the wrong window for the window->Collapsed test.
  • Window: Calling IsItemActive(), IsItemHovered() etc. after a call to Begin() provides item data for the title bar, so you can easily test if the title bar is being hovered, etc. (#823)
  • Window: Made it possible to use SetNextWindowPos() on a child window.
  • Window: Fixed a one frame glitch. When an appearing window claimed the focus themselves, the title bar wouldn't use the focused color for one frame.
  • Window: Added ImGuiWindowFlags_ResizeFromAnySide flag to resize from any borders or from the lower-left corner of a window. This requires your backend to honor GetMouseCursor() requests for full usability. (#822)
  • Window: Sizing fixes when useing SetNextWindowSize() on individual axises.
  • Window: Made mouse wheel scrolling accomodate better to windows that are smaller than the scroll step.
  • Window: SetNextWindowContentSize() adjust for the size of decorations (title bar/menu bar), but not for borders are we consistently make borders not affect layout. If you need a non-child window of an exact size with border enabled but zero window padding, you'll need to accodomate for the border size yourself.
  • Window: Using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set. (#1380, #1502)
  • Window: Active Modal window always set the WantCaptureKeyboard flag. (#744)
  • Window: Moving window doesn't use accumulating MouseDelta so straying out of imgui boundaries keeps moved imgui window at the same cursor-relative position.
  • IsWindowFocused(): Added ImGuiFocusedFlags_ChildWindows flag to include child windows in the focused test. (#1382).
  • IsWindowFocused(): Added ImGuiFocusedFlags_RootWindow flag to start focused test from the root (top-most) window. Obsolete IsRootWindowFocused(). (#1382)
  • IsWindowHovered(): Added ImGuiHoveredFlags_ChildWindows flag to include child windows in the hovered test. (#1382).
  • IsWindowHovered(): Added ImGuiHoveredFlags_RootWindow flag to start hovered test from the root (top-most) window. The combination of both flags obsoletes IsRootWindowOrAnyChildHovered(). (#1382)
  • IsWindowHovered(): Fixed return value when an item is active to use the same logic as IsItemHovered(). (#1382, #1404)
  • IsWindowHovered(): Always return true when current window is being moved. (#1382)
  • Scrollbar: Fixed issues with vertical scrollbar flickering/appearing, typically when manually resizing and using a pattern of filling available height (e.g. full sized BeginChild).
  • Scrollbar: Minor graphical fix for when scrollbar don't have enough visible space to display the full grab.
  • Scrolling: Fixed padding and scrolling asymetry where lower/right sides of a window wouldn't use WindowPadding properly + causing minor scrolling glitches.
  • Tree: TreePush with zero arguments was ambiguous. Resolved by making it call TreePush(const void*). [@JasonWilkins]
  • Tree: Renamed ImGuiTreeNodeFlags_AllowOverlapMode to ImGuiTreeNodeFlags_AllowItemOverlap. (#600, #1330)
  • MenuBar: Fixed minor rendering issues on the right size when resizing a window very small and using rounded window corners.
  • MenuBar: better software clipping to handle small windows, in particular child window don't have minimum constraints so we need to render clipped menus better.
  • BeginMenu(): Tweaked the Arrow/Triangle displayed on child menu items.
  • Columns: Clipping columns borders on Y axis on CPU because some Linux GPU drivers appears to be unhappy with triangle spanning large regions. (#125)
  • Columns: Added ImGuiColumnsFlags_GrowParentContentsSize to internal API to restore old content sizes behavior (may be obsolete). (#1444, #125)
  • Columns: Columns width is no longer lost when dragging a column to the right side of the window, until releasing the mouse button you have a chance to save them. (#1499, #125). [@ggtucker]
  • Columns: Fixed dragging when using a same of columns multiple times in the frame. (#125)
  • Indent(), Unindent(): Allow passing negative values.
  • ColorEdit4(): Made IsItemActive() return true when picker popup is active. (#1489)
  • ColorEdit4(): Tweaked tooltip so that the color button aligns more correctly with text.
  • ColorEdit4(): Support drag and drop. Color buttons can be used as drag sources, and ColorEdit widgets as drag targets. (#143)
  • ColorPicker4(): Fixed continously returning true when holding mouse button on the sat/value/alpha locations. We only return true on value change. (#1489)
  • NewFrame(): using literal strings in the most-frequently firing IM_ASSERT expressions to increase the odd of programmers seeing them (especially those who don't use a debugger).
  • NewFrame() now asserts if neither Render or EndFrame have been called. Exposed EndFrame(). Made it legal to call EndFrame() more than one. (#1423)
  • ImGuiStorage: Added BuildSortByKey() helper to rebuild storage from stratch.
  • ImFont: Added GetDebugName() helper.
  • ImFontAtlas: Added missing Thai punctuation in the GetGlyphRangesThai() ranges. (#1396) [@nProtect]
  • ImDrawList: Removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Anti-aliasing is controlled via the regular style.AntiAliased flags.
  • ImDrawList: Added ImDrawList::AddImageRounded() helper. (#845) [@thedmd]
  • ImDrawList: Refactored to make ImDrawList independant of ImGui. Removed static variable in PathArcToFast() which caused linking issues to some.
  • ImDrawList: Exposed ImDrawCornerFlags, replaced occurences of ~0 with an explicit ImDrawCornerFlags_All. NB: Inversed BotLeft (prev 1<<3, now 1<<2) and BotRight (prev 1<<2, now 1<<3).
  • ImVector: Added ImVector::push_front() helper.
  • ImVector: Added ImVector::contains() helper.
  • ImVector: insert() uses grow_capacity() instead of using grow policy inconsistent with push_back().
  • Internals: Remove requirement to define IMGUI_DEFINE_PLACEMENT_NEW to use the IM_PLACEMENT_NEW macro. (#1103)
  • Internals: ButtonBehavior: Fixed ImGuiButtonFlags_NoHoldingActiveID flag from incorrectly setting the ActiveIdClickOffset field, which had no known effect with imgui code but could have affected custom drag and drop patterns. And it is more correct this way. (#1418)
  • Internals: ButtonBehavior: Fixed ImGuiButtonFlags_AllowOverlapMode to avoid temporarily activating widgets on click before they have been correctly double-hovered. (#319, #600)
  • Internals: Added SplitterBehavior() helper. (#319)
  • Internals: Added IM_NEW(), IM_DELETE() helpers. (#484, #504, #1517)
  • Internals: Basic refactor of the settings API which now allows external elements to be loaded/saved.
  • Demo: Added ShowFontSelector() showing loaded fonts.
  • Demo: Added ShowStyleSelector() to select among default styles. (#707)
  • Demo: Renamed the emblematic ShowTestWindow() function to ShowDemoWindow().
  • Demo: Style Editor: Added a "Simplified settings" sections with checkboxes for border size and frame rounding. (#707, #1019)
  • Demo: Style Editor: Added combo box to select stock styles and select current font when multiple are loaded. (#707)
  • Demo: Style Editor: Using local storage so Save/Revert button makes more sense without code passing its storage. Aadded horizontal scroll bar. Fixed Save/Revert button to be always accessible. (#1211)
  • Demo: Console: Fixed context menu issue. (#1404)
  • Demo: Console: Fixed incorrect positioning which was hidden by a minor scroll issue (this would affect people who copied the Console code as is).
  • Demo: Constrained Resize: Added more test cases. (#1417)
  • Demo: Custom Rendering: Fixed clipping rectangle extruding out of parent window.
  • Demo: Layout: Removed unnecessary and misleading BeginChild/EndChild calls.
  • Demo: The "Color Picker with Palette" demo supports drag and drop. (#143)
  • Demo: Display better mouse cursor info for debugging backends.
  • Demo: Stopped using rand() function in demo code.
  • Examples: Added a handful of extra comments (about fonts, third-party libraries used in the examples, etc.).
  • Examples: DirectX9: Handle loss of D3D9 device (D3DERR_DEVICELOST). (#1464)
  • Examples: Added null_example/ which is helpful for quick testing on multiple compilers/settings without relying on graphics library.
  • Fix for using alloca() in "Clang with Microsoft Codechain" mode.
  • Various fixes, optimizations, comments.

Gallery

Some screenshots submitted since 1.52. Please submit pictures or video of your games/applications using dear imgui! See more pictures here > #1269
I also started to gather a list of known users, see: Software-using-dear-imgui.

Editor by @itamago
#1269 (comment)
image

lib0 engine by @procedural
https://procedural.itch.io/lib0-engine
Using syntax highlighting text editor for ImGui by @BalazsJako
https://github.com/BalazsJako/ImGuiColorTextEdit
33677311-926cee9a-dab8-11e7-98ff-8c96d9988251

Custom widget and node editor by @jkwi
#1269 (comment)
32727230-1c10cbf2-c87c-11e7-98db-da037748744a

Sequencer by @tseeker
33677368-cb344a52-dab8-11e7-8f78-1a735961d77f

Curve editor by @thennequin
34120960-b333ddd2-e427-11e7-87a9-41c453c92a95

3D fractal path tracer by @OpenKastle
33698927-cedd9742-dadd-11e7-87de-493983b4ddef

@ocornut ocornut released this Oct 27, 2017 · 1674 commits to master since this release

Assets 2

v1.52:

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
Scroll below for a gallery of screenshots.

This is a general maintenance release with lots useful small/medium features and fixes. Make sure to read the Breaking Changes section. Keeping your copy of dear imgui updated is recommended!

Work has been done behind the scenes on features that are not yet available in the public branch. I hope that the next version will start to include some of them (tabs, docking, etc.). And I realize that people are waiting for dear imgui to ship with decent default themes, please wait a little bit more! :). In addition, the beta navigation branch is in sync with master and has received various improvements in the past month.

Support future development of dear imgui

This month has been kindly sponsored by individual users through Patreon + by a private game studio. If your company is using dear imgui, please consider financial support (e.g. paid support or sponsoring a few weeks/months of development). See Readme for details and contact info.

How to update

Overwrite every file except imconfig.h (if you have modified it). Check out Breaking Changes section below. If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it. Please report any issue to the GitHub page!

You can also enable IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h to forcefully disable legacy names and symbols. Doing it every few releases is probably sane.

Breaking Changes

  • IO: io.MousePos needs to be set to ImVec2(-FLT_MAX,-FLT_MAX) when mouse is unavailable/missing, instead of ImVec2(-1,-1) as previously) This is needed so we can clear io.MouseDelta field when the mouse is made available again.
  • Renamed AlignFirstTextHeightToWidgets() to AlignTextToFramePadding(). Kept inline redirection function (will obsolete).
  • Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses PushStyleColor(). The old size parameter there was also misleading and equivalent to calling SetNextWindowSize(size, ImGuiCond_FirstTimeEver). Kept inline redirection function (will obsolete).
  • Obsoleted IsItemHoveredRect(), IsMouseHoveringWindow() in favor of using the newly introduced flags of IsItemHovered() and IsWindowHovered(). Kept inline redirection function (will obsolete). (#1382)
  • Removed IsItemRectHovered(), IsWindowRectHovered() recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
  • Changed IsWindowHovered() default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
  • Renamed imconfig.h's IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS/IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS to IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS/IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS for consistency.

All Changes

  • ProgressBar: fixed rendering when straddling rounded area. (#1296)
  • SliderFloat, DragFloat: Using scientific notation e.g. "%.1e" in the displayed format string doesn't mistakenly trigger rounding of the value. [@MomentsInGraphics]
  • Combo, InputFloat, InputInt: Made the small button on the right side align properly with the equivalent colored button of ColorEdit4().
  • IO: Tweaked logic for io.WantCaptureMouse so it now outputs false when e.g. hovering over void while an InputText() is active. (#621) [@pdoane]
  • IO: Fixed io.WantTextInput from mistakenly outputting true when an activated Drag or Slider was previously turned into an InputText(). (#1317)
  • Misc: Added flags to IsItemHovered(), IsWindowHovered() to access advanced hovering-test behavior: ImGuiHoveredFlags_AllowWhenBlockedByPopup, ImGuiHoveredFlags_AllowWhenBlockedByActiveItem, ImGuiHoveredFlags_AllowWhenOverlapped, ImGuiHoveredFlags_RectOnly. Generally useful for popups and drag'n drop behaviors. (relates to ~#439, #1013, #143, #925)
  • Input: Added IsMousePosValid() helper.
  • Input: Added GetKeyPressedAmount() to easily measure press count when the repeat rate is faster than the frame rate.
  • Input/Focus: Disabled TAB and Shift+TAB when CTRL key is held.
  • Checkbox: Now rendering a tick mark instead of a full square.
  • ColorEdit4: Added "Copy as..." option in context menu. (#346)
  • ColorPicker: Improved ColorPicker hue wheel color interpolation. (#1313) [@thevaber]
  • ColorButton: Reduced bordering artefact that would be particularly visible with an opaque Col_FrameBg and FrameRounding enabled.
  • ColorButton: Fixed rendering color button with a checkerboard if the transparency comes from the global style.Alpha and not from the actual source color.
  • TreeNode: Added ImGuiTreeNodeFlags_FramePadding flag to conveniently create a tree node with full padding at the beginning of a line, without having to call AlignTextToFramePadding().
  • Trees: Fixed calling SetNextTreeNodeOpen() on a collapsed window leaking to the first tree node item of the next frame.
  • Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
  • Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
  • Windows: Added IsWindowAppearing() helper (helpful e.g. as a condition before initializing some of your own things.).
  • Windows: Fixed title bar color of top-most window under a modal window.
  • Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
  • Windows: Fixed Begin() auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
  • Windows: Fixed calling Begin() more than once per frame setting window_just_activated_by_user which in turn would set enable the Appearing condition for that frame.
  • Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
  • Windows: Made the ImGuiWindowFlags_NoMove flag properly inherited from parent to child, so in a setup with RootWindow (no flag) -> Child (NoMove) -> SubChild (no flag) user won't be able to move the root window by clicking on SubChild. (#1381)
  • Popups: Popups can be closed with a right-click anywhere, without altering focus under the popup. (~#439)
  • Popups: BeginPopupContextItem(), BeginPopupContextWindow() are now setup to allow reopening a context menu by right-clicking again. (~#439)
  • Popups: BeginPopupContextItem() now supports a NULL string identifier and uses the last item ID if available.
  • Popups: Added OpenPopupOnItemClick() helper which mimic BeginPopupContextItem() but doesn't do the BeginPopup().
  • MenuItem: Only activating on mouse release. [@Urmeli0815] (was already fixed in nav branch).
  • MenuItem: Made tick mark thicker (thick mark?).
  • MenuItem: Tweaks to be usable inside a menu bar (nb: it looks like a regular menu and thus is misleading, prefer using Button() and regular widgets in menu bar if you need to). (#1387)
  • ImDrawList: Fixed a rare draw call merging bug which could lead to undisplayed triangles. (#1172, #1368)
  • ImDrawList: Fixed a rare bug in ChannelsMerge() when all contents has been clipped, leading to an extraneous draw call being created. (#1172, #1368)
  • ImFont: Added AddGlyph() building helper for use by custom atlas builders.
  • ImFontAtlas: Added support for CustomRect API to submit custom rectangles to be packed into the atlas. You can map them as font glyphs, or use them for custom purposes. After the atlas is built you can query the position of your rectangles in the texture and then copy your data there. You can use this features to create e.g. full color font-mapped icons.
  • ImFontAtlas: Fixed fall-back handling when merging fonts, if a glyph was missing from the second font input it could have used a glyph from the first one. (#1349) [@inolen]
  • ImFontAtlas: Fixed memory leak on build failure case when stbtt_InitFont failed (generally due to incorrect or supported font type). (#1391) (@Moka42)
  • ImFontConfig: Added RasterizerMultiply option to alter the brightness of individual fonts at rasterization time, which may help increasing readability for some.
  • ImFontConfig: Added RasterizerFlags to pass options to custom rasterizer (e.g. the imgui_freetype rasterizer in imgui_club has such options).
  • ImVector: added resize() variant with initialization value.
  • Misc: Changed the internal name formatting of child windows identifier to use slashes (instead of dots) as separator, more readable.
  • Misc: Fixed compilation with IMGUI_DISABLE_OBSOLETE_FUNCTIONS defined.
  • Misc: Marked all format+va_list functions with format attribute so GCC/Clang can warn about misuses.
  • Misc: Fixed compilation on NetBSD due to missing alloca.h (#1319) [@RyuKojiro]
  • Misc: Improved warnings compilation for newer versions of Clang. (#1324) (@waywardmonkeys)
  • Misc: Added io.WantMoveMouse flags (from Nav branch) and honored in Examples applications. Currently unused but trying to spread Examples applications code that supports it.
  • Misc: Added IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS support in imconfig.h to allow user reimplementing the ImFormatString() functions e.g. to use stb_printf(). (#1038)
  • Misc: [Windows] Fixed default Win32 SetClipboardText() handler leaving the Win32 clipboard handler unclosed on failure. [@pdoane]
  • Style: Added ImGuiStyle::ScaleAllSizes(float) helper to make it easier to have application transition e.g. from low to high DPI with a matching style.
  • Metrics: Draw window bounding boxes when hovering Pos/Size; List all draw layers; Trimming empty commands like Render() does.
  • Examples: OpenGL3: Save and restore sampler state. (#1145) [@nlguillemot]
  • Examples: OpenGL2, OpenGL3: Save and restore polygon mode. (#1307) [@JJscott]
  • Examples: DirectX11: Allow creating device with feature level 10 since we don't really need much for that example. (#1333)
  • Examples: DirectX9/10/12: Using the Win32 SetCapture/ReleaseCapture API to read mouse coordinates when they are out of bounds. (#1375) [@Gargaj, @ocornut]
  • Tools: Fixed binary_to_compressed_c tool to return 0 when successful. (#1350) [@benvanik]
  • Internals: Exposed more helpers and unfinished features in imgui_internal.h. (use at your own risk!).
  • Internals: A bunch of internal refactoring, hopefully haven't broken anything! Merged a bunch of internal changes from the upcoming Navigation branch.
  • Various tweaks, fixes and documentation changes.

Beta Navigation Branch

Lots of work has been done toward merging the Beta Gamepad/Keyboard Navigation branch (#787) in master.
Please note that this branch is always kept up to date with master. If you are using the navigation branch, some of the changes include:

  • Nav: Added #define IMGUI_HAS_NAV in imgui.h to ease sharing code between both branches. (#787)
  • Nav: MainMenuBar now releases focus when user gets out of the menu layer. (#787)
  • Nav: When applying focus to a window with only menus, the menu layer is automatically activated. (#787)
  • Nav: Added ImGuiNavInput_KeyMenu (~Alt key) aside from ImGuiNavInput_PadMenu input as it is one differentiator of pad vs keyboard that was detrimental to the keyboard experience. Although isn't officially supported, it makes the current experience better. (#787)
  • Nav: Move requests now wrap vertically inside Menus and Popups. (#787)
  • Nav: Allow to collapse tree nodes with NavLeft and open them with NavRight. (#787, #1079).
  • Nav: It's now possible to navigate sibling of a menu-bar while navigating inside one of their child. If a Left<>Right navigation request fails to find a match we forward the request to the root menu. (#787, #126)
  • Nav: Fixed SetItemDefaultFocus from stealing default focus when we are initializing default focus for a menu bar layer. (#787)
  • Nav: Support for fall-back horizontal scrolling with PadLeft/PadRight (nb: fall-back scrolling is only used to navigate windows that have no interactive items). (#787)
  • Nav: Fixed tool-tip from being selectable in the window selection list. (#787)
  • Nav: CollapsingHeader(bool*) variant: fixed for IsItemHovered() not working properly in the nav branch. (#600, #787)
  • Nav: InputText: Fixed using Up/Down history callback feature when Nav is enabled. (#787)
  • Nav: InputTextMultiline: Fixed navigation/selection. Disabled selecting all when activating a multi-line text editor. (#787)
  • Nav: More consistently drawing a (thin) navigation rectangle hover filled frames such as tree nodes, collapsing header, menus. (#787)
  • Nav: Various internal refactoring.

Gallery

Not many new screenshots this month! Please submit pictures or video of your games/applications using dear imgui! See more pictures here > #1269
I also started to gather a list of known users, see: Software-using-dear-imgui.

gpuvis

goxel 3D voxel editor
goxel-ios

cheevos hunter

MEGA SCREENSHOT! (of the demo window, taken August 8)

@ocornut ocornut released this Aug 24, 2017 · 1922 commits to master since this release

Assets 2

v1.51: pick all the colors!

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
Scroll below for a gallery of screenshots.

This release includes a color picker, plenty of new color edit options, columns fixes/improvements, a dozen other fixes or additions, and some much necessary summer cleanup. Initially I wanted this release to include the new styles, which led me to work on some of the remaining styling/border issues.. and it opened multiple can of worms so I stashed that extra work aside for now. Massaging and finishing the color edit/picker api is already worthy of a release tag. Also releases should be more frequent now (maybe one every month?).

// The existing ColorEdit API now allows the user to open a color picker.
// Right-clicking a color widget or picker will also open an option menu.
ImGui::ColorEdit4("My Color", (float*)&col); 

picker_options

I am also soft-launching imgui club, a separate repository to host officially maintained extensions to use with dear imgui. The current repository include an extension to use Freetype for font rasterization (originally submitted by @Vuhdo), and a memory editor applet. More will come!

static MemoryEditor mem_edit;
mem_edit.DrawWindow("Memory Editor", data, data_size);

memory editor

Additionally, remember that the beta gamepad navigation branch (see #787) is pretty much kept up to date with master. Three navigation-branch specific fixes were applied to it since 1.50.

Support future development of dear imgui

This library is free (as in freedom), but needs your support to sustain its development. There are lots of desirable new features and maintenance to do. If you are an individual and want to support dear imgui, you can support development via Monthly donations on Patreon or One-off donations via PayPal. If your company is using dear imgui, please consider financial support (e.g. sponsoring a few weeks/months of development). I can invoice for private support, custom development etc. See Readme for my contact info.)

Patreon: Patreon PayPal: PayPal

How to update

Overwrite every file except imconfig.h (if you have modified it). Check out Breaking Changes section below. If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it. Please report any issue to the GitHub page!

Breaking Changes

As discussed in the previous release notes (1.50), work on dear imgui has been gradually resuming. It means that fixes and new features should be tackled at a faster rate than last year. However, in order to move forward with the library and get rid of some cruft, I have taken the liberty to be a little bit more aggressive than usual with API breaking changes. Read the details below and search for those names in your code!

In the grand scheme of things, those changes are small and should not affect everyone, but this is technically our most aggressive release so far in term of API breakage. If you want to be extra forward-facing, you can enable #define IMGUI_DISABLE_OBSOLETE_FUNCTIONS in your imconfig.h to disable the obsolete names/redirection.

  • Renamed IsItemHoveredRect() to IsItemRectHovered(). Kept inline redirection function (will obsolete).
  • Renamed IsMouseHoveringWindow() to IsWindowRectHovered() for consistency. Kept inline redirection function (will obsolete).
  • Renamed IsMouseHoveringAnyWindow() to IsAnyWindowHovered() for consistency. Kept inline redirection function (will obsolete).
  • Renamed ImGuiCol_Columns*** enums to ImGuiCol_Separator***. Kept redirection enums (will obsolete).
  • Renamed ImGuiSetCond*** types and enums to ImGuiCond***. Kept redirection enums (will obsolete).
  • Renamed GetStyleColName() to GetStyleColorName() for consistency. Unlikely to be used by end-user!
  • Added PushStyleColor(ImGuiCol idx, ImU32 col) overload, which might cause an "ambiguous call" compilation error if you are using ImColor() with implicit cast. Cast to ImU32 or ImVec4 explicily to fix.
  • Marked the weird IMGUI_ONCE_UPON_A_FRAME helper macro as obsolete. Prefer using the more explicit ImGuiOnceUponAFrame.
  • Changed ColorEdit4(const char* label, float col[4], bool show_alpha = true) signature to ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0), where flags 0x01 is a safe no-op (hello dodgy backward compatibility!). The new ColorEdit4/ColorPicker4 functions have lots of available flags! Check and run the demo window, under "Color/Picker Widgets", to understand the various new options.
  • Changed signature of ColorButton(ImVec4 col, bool small_height = false, bool outline_border = true) to ColorButton(const char* desc_id, ImVec4 col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0)). This function was rarely used and was very dodgy (no explicit ID!).
  • Changed BeginPopupContextWindow(bool also_over_items=true, const char* str_id=NULL, int mouse_button=1) signature to (const char* str_id=NULL, int mouse_button=1, bool also_over_items=true). This is perhaps the most aggressive change in this update, but note that the majority of users relied on default parameters completely, so this will affect only a fraction of users of this already rarely used function.
  • Removed IsPosHoveringAnyWindow(), which was partly broken and misleading. In the vast majority of cases, people using that function wanted to use io.WantCaptureMouse flag. Replaced with IM_ASSERT + comment redirecting user to io.WantCaptureMouse. (#1237)
  • Removed the old ValueColor() helpers, they are equivalent to calling Text(label) + SameLine() + ColorButton().
  • Removed ColorEditMode() and ImGuiColorEditMode type in favor of ImGuiColorEditFlags and parameters to the various Color*() functions. The SetColorEditOptions() function allows to initialize default but the user can still change them with right-click context menu. Commenting out your old call to ColorEditMode() may just be fine!

Other Changes

  • Added flags to ColorEdit3(), ColorEdit4(). The color edit widget now has a context-menu and access to the color picker. (#346)
  • Added flags to ColorButton(). (#346)
  • Added ColorPicker3(), ColorPicker4(). The API along with those of the updated ColorEdit4() was designed so you may use them in various situation and hopefully compose your own picker if required. There are a bunch of available flags, check the Demo window and comment for ImGuiColorEditFlags_. Some of the options it supports are: two color picker types (hue bar + sat/val rectangle, hue wheel + rotating sat/val triangle), display as u8 or float, lifting 0.0..1.0 constraints (currently rgba only), context menus, alpha bar, background checkerboard options, preview tooltip, basic revert. For simple use, calling the existing ColorEdit4() function as you did before will be enough, as you can now open the color picker from there. (#346) [@r-lyeh, @nem0, @thennequin, @dariomanesku and @ocornut]
  • Added SetColorEditOptions() to set default color options (e.g. if you want HSV over RGBA, float over u8, select a default picker mode etc. at startup time without a user intervention. Note that the user can still change options with the context menu unless disabled with ImGuiColorFlags_NoOptions or explicitly enforcing a display type/picker mode etc.).
  • Added user-facing IsPopupOpen() function. (#891) [@mkeeter]
  • Added GetColorU32(u32) variant that perform the style alpha multiply without a floating-point round trip, and helps makes code more consistent when using ImDrawList APIs.
  • Added PushStyleColor(ImGuiCol idx, ImU32 col) overload.
  • Added GetStyleColorVec4(ImGuiCol idx) which is equivalent to accessing ImGui::GetStyle().Colors[idx] (aka return the raw style color without alpha alteration).
  • ImFontAtlas: Added GlyphRangesBuilder helper class, which makes it easier to build custom glyph ranges from your app/game localization data, or add into existing glyph ranges.
  • ImFontAtlas: Added TexGlyphPadding option. (#1282) [@jadwallis]
  • ImFontAtlas: Made it possible to override size of AddFontDefault() (even if it isn't really recommended!).
  • ImDrawList: Added GetClipRectMin(), GetClipRectMax() helpers.
  • Fixed Ini saving crash if the ImGuiWindowFlags_NoSavedSettings gets removed from a window after its creation (unlikely!). (#1000)
  • Fixed PushID()/PopID() from marking parent window as Accessed (which needlessly woke up the root "Debug" window when used outside of a regular window). (#747)
  • Fixed an assert when calling CloseCurrentPopup() twice in a row. [@nem0]
  • Window size can be loaded from .ini data even if ImGuiWindowFlags_NoResize flag is set. (#1048, #1056)
  • Columns: Added SetColumnWidth(). (#913) [@ggtucker]
  • Columns: Dragging a column preserve its width by default. (#913) [@ggtucker]
  • Columns: Fixed first column appearing wider than others. (#1266)
  • Columns: Fixed allocating space on the right-most side with the assumption of a vertical scrollbar. The space is only allocated when needed. (#125, #913, #893, #1138)
  • Columns: Fixed the right-most column from registering its content width to the parent window, which led to various issues when using auto-resizing window or e.g. horizonal scrolling. (#519, #125, #913)
  • Columns: Refactored some of the columns code internally toward a better API (not yet exposed) + minor optimizations. (#913) [@ggtucker, @ocornut]
  • Popups: Most popups windows can be moved by the user after appearing (if they don't have explicit positions provided by caller, or e.g. sub-menu popup). The previous restriction was totally arbitrary. (#1252)
  • Tooltip: SetTooltip() is expanded immediately into a window, honoring current font / styling setting. Add internal mechanism to override tooltips. (#862)
  • PlotHistogram: bars are drawn based on zero-line, so negative values are going under. (#828)
  • Scrolling: Fixed return values of GetScrollMaxX(), GetScrollMaxY() when both scrollbars were enabled. Tweak demo to display more data. (#1271) [@degracode]
  • Scrolling: Fixes for Vertical Scrollbar not automatically getting enabled if enabled Horizontal Scrollbar straddle the vertical limit. (#1271, #246)
  • Scrolling: SetScrollHere(), SetScrollFromPosY(): Fixed Y scroll aiming when Horizontal Scrollbar is enabled. (#665).
  • [Windows] Clipboard: Fixed not closing win32 clipboard on early open failure path. (#1264)
  • Removed an unnecessary dependency on int64_t which failed on some older compilers.
  • Demo: Rearranged everything under Widgets in a more consistent way.
  • Demo: Columns: Added Horizontal Scrolling demo. Tweaked another Columns demo. (#519, #125, #913)
  • Examples: OpenGL: Various makefiles for MINGW, Linux. (#1209, #1229, #1209) [@fr500, @acda]
  • Examples: Enabled vsync by default in example applications, so it doesn't confuse people that the sample run at 2000+ fps and waste an entire CPU. (#1213, #1151).
  • Various other small fixes, tweaks, comments, optimizations.

Gallery

See more here > #1269

Seaquence

Lumix Engine

Unnamed Engine by @AntonioZero

TT Isle of Man: Ride of the Edge

StyleTransferFunction by @jose-villegas

@ocornut ocornut released this Jun 2, 2017 · 2170 commits to master since this release

Assets 2

v1.50 release and the resuming of dear imgui operations!

See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
Scroll below for a gallery of screenshots.

Version 1.49 has been released a year ago! It was a slow year for the library: I started a company, I made and shipped a game (extensively using imgui) on 3 consoles and I got married. So imgui wasn't really my top occupation this year. The game has now shipped, and aside from a few things left to do (e.g. finishing the Steam version, handling physical releases of the game, fully vacating our London apartment...), I hope to spend more time on the library from this summer. The Patreon which had been put on hold in December has now been resumed.

1.50 is the sum of all improvements and fixes that happened this year, so if you have been closely following the updates here, nothing will be very new to you. As more time is invested into dear imgui, new features will be worked on, and releases should become more frequent again.

Please also note of the beta gamepad navigation branch (see #787) which is semi-functional and various studios have been using in production already. The branch is kept in sync with master but still require some work. This is likely be merged into 1.51 or 1.52. The initial work has been kindly sponsored by Insomniac, final push this summer is being kindly sponsored by another mystery company.

imgui-nav-20160821b

Support future development of dear imgui

This library is free (as in freedom), but needs your support to sustain its development. There are lots of desirable new features and maintenance to do. If you are an individual and want to support dear imgui, you can support development via Monthly donations on Patreon or One-off donations via PayPal.

Patreon:

Patreon

PayPal:

PayPal

If you work for a company using dear imgui or have the means to do so, please consider sponsoring future development (e.g: sponsor a few weeks or months of work). I can invoice/bill via my company, provide private support, custom development etc. E-mail: omarcornut at gmail. Programmers working for established game studios: contact me so I can help you convince your studio to fund a little of imgui development! :)

(Future work will include, but is not limited to: add a testing framework, add documentation, improving the gamepad and keyboard navigation features, rewrite columns (with more natural header, re-ordering, sizing policy, persistent settings, sorting, ability to recurse - basically fix the existing broken columns), add tabs, add and maintain a first-class citizen docking extension, finish color picker, add alt-style local shortcuts, add global style shortcuts (which will involve menus running without rendering), make remote-style imgui an easy to use first class citizen, improve and add layout tools, create a competent multi-purpose plot/graph api, improving styling and the default look of imgui, improve usage of multiple context or multi-threaded situations, rewrite the multi-line text editor (many fixes and desirable features), further optimizations, introduce a more dynamic font atlas, add extensions to provide basic form of rich/markup text display, provide support to all sorts of user, massage internals to stabilize them and allow extensions to be easier to maintain, etc.)

How to update

Overwrite every file except imconfig.h (which you may have modified). Check out Breaking Changes section below. If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it. Please report any issue to the GitHub page!

Breaking Changes

  • Added a void* user_data parameter to Clipboard function handlers. (#875)
  • SameLine(x) with x>0.0f is now relative to left of column/group if any, and not always to left of window. This was sort of always the intent and hopefully breakage should be minimal.
  • Renamed ImDrawList::PathFill() - rarely used directly - to ImDrawList::PathFillConvex() for clarity and consistency.
  • Removed ImFontConfig::MergeGlyphCenterV in favor of a more multipurpose ImFontConfig::GlyphOffset.
  • Style: style.WindowTitleAlign is now a ImVec2 (ImGuiAlign enum was removed). set to (0.5f,0.5f) for horizontal+vertical centering, (0.0f,0.0f) for upper-left, etc.
  • BeginChild(const char*) now applies the stack id to the provided label, consistently with other functions as it should always have been. It shouldn't affect you unless (extremely unlikely) you were appending multiple times to a same child from different locations of the stack id. If that's the case, generate an id with GetId() and use it instead of passing string to BeginChild().

All Changes

  • InputText(): Added support for CTRL+Backspace (delete word).
  • InputText(): OSX uses Super+Arrows for home/end. Add Shortcut+Backspace support. (#650) [@michaelbartnett]
  • InputText(): Got rid of individual OSX-specific options in ImGuiIO, added a single io.OSXBehaviors flag. (#473, #650)
  • InputText(): Fixed pressing home key on last character when it isn't a trailing \n (#588, #815)
  • InputText(): Fixed state corruption/crash bug in stb_textedit.h redo logic when exhausting undo/redo char buffer. (#715. #681)
  • InputTextMultiline(): Fixed Ctrl+DownArrow moving scrolling out of bounds.
  • InputTextMultiline(): Scrollbar fix for when input and latched internal buffers differs in a way that affects vertical scrollbar existence. (#725)
  • ImFormatString(): Fixed an overflow handling bug with implementation of vsnprintf() that do not return -1. (#793)
  • BeginChild(const char*) now applies stack id to provided label, consistent with other widgets. (#894, #713)
  • SameLine() with explicit X position is relative to left of group/columns. (ref #746, #125, #630)
  • SliderInt(), SliderFloat() supports reverse direction (where v_min > v_max). (#854)
  • SliderInt(), SliderFloat() better support for when v_min==v_max. (#919)
  • SliderInt(), SliderFloat() enforces writing back value when interacting, to be consistent with other widgets. (#919)
  • SliderInt, SliderFloat(): Fixed edge case where style.GrabMinSize being bigger than slider width can lead to a division by zero. (#919)
  • Added IsRectVisible() variation with explicit start-end positions. (#768) [@thedmd]
  • Fixed TextUnformatted() clipping bug in the large-text path when horizontal scroll has been applied. (#692, #246)
  • Fixed minor text clipping issue in window title when using font straying above usual line. (#699)
  • Fixed SetCursorScreenPos() fixed not adjusting CursorMaxPos as well.
  • Fixed scrolling offset when using SetScrollY(), SetScrollFromPosY(), SetScrollHere() with menu bar.
  • Fixed using IsItemActive() after EndGroup() or any widget using groups. (#840, #479)
  • Fixed IsItemActive() lagging by one frame on initial widget activation. (#840)
  • Fixed Separator() zero-height bounding box resulting in clipping when laying exactly on top line of clipping rectangle (#860)
  • Fixed PlotLines() PlotHistogram() calling with values_count == 0.
  • Fixed clicking on a window's void while staying still overzealously marking .ini settings as dirty. (#923)
  • Fixed assert triggering when a window has zero rendering but has a callback. (#810)
  • Scrollbar: Fixed rendering when sizes are negative to reduce glitches (which can happen with certain style settings and zero WindowMinSize).
  • EndGroup(): Made IsItemHovered() work when an item was activated within the group. (#849)
  • BulletText(): Fixed stopping to display formatted string after the '##' mark.
  • Closing the focused window restore focus to the first active root window in descending z-order .(part of #727)
  • Word-wrapping: Fixed a bug where we never wrapped after a 1 character word. [@sronsse]
  • Word-wrapping: Fixed TextWrapped() overriding wrap position if one is already set. (#690)
  • Word-wrapping: Fixed incorrect testing for negative wrap coordinates, they are perfectly legal. (#706)
  • ImGuiListClipper: fixed automatic-height calc path dumbly having user display element 0 twice. (#661, #716)
  • ImGuiListClipper: Fix to behave within column. (#661, #662, #716)
  • ImDrawList: Renamed ImDrawList::PathFill() to ImDrawList::PathFillConvex() for clarity. (BREAKING API)
  • Columns: End() avoid calling Columns(1) if no columns set is open, not sure why it wasn't the case already (pros: faster, cons: exercise less code).
  • ColorButton(): Fix ColorButton showing wrong hex value for alpha. (#1068) [@codecat]
  • ColorEdit4(): better preserve inputting value out of 0..255 range, display then clamped in Hexadecimal form.
  • Shutdown() clear out some remaining pointers for sanity. (#836)
  • Added IMGUI_USE_BGRA_PACKED_COLOR option in imconfig.h (#767, #844) [@thedmd]
  • Style: Removed the inconsistent shadow under RenderCollapseTriangle() (~#707)
  • Style: Added ButtonTextAlign, ImGuiStyleVar_ButtonTextAlign. (#842)
  • ImFont: Allowing to use up to 0xFFFE glyphs in same font (increased from previous 0x8000).
  • ImFont: Added GetGlyphRangesThai() helper. [@nProtect]
  • ImFont: CalcWordWrapPositionA() fixed font scaling with fallback character.
  • ImFont: Calculate and store the approximate texture surface to get an idea of how costly each source font is.
  • ImFontConfig: Added GlyphOffset to explicitely offset glyphs at font build time, useful for merged fonts. Removed MergeGlyphCenterV. (BREAKING API)
  • Clarified asserts in CheckStacksSize() when there is a stack mismatch.
  • Context: Support for #define-ing GImGui and IMGUI_SET_CURRENT_CONTEXT_FUNC to enable custom thread-based hackery (#586)
  • Updated stb_truetype.h to 1.14 (added OTF support, removed warnings). (#883, #976)
  • Updated stb_rect_pack.h to 0.10 (removed warnings). (#883)
  • Added ImGuiMouseCursor_None enum value for convenient usage by app/binding.
  • Clipboard: Added a void* user_data parameter to Clipboard function handlers. (#875) (BREAKING API)
  • Internals: Refactor internal text alignment options to use ImVec2, removed ImGuiAlign. (#842, #222)
  • Internals: Renamed ImLoadFileToMemory to ImFileLoadToMemory to be consistent with ImFileOpen + fix mismatching .h name. (#917)
  • Windows: Fixed Windows default clipboard handler leaving its buffer unfreed on application's exit. (#714)
  • Windows: No default IME handler when compiling for Windows using GCC. (#738)
  • Windows: Now using _wfopen() instead of fopen() to allow passing in paths/filenames with UTF-8 characters. (#917)
  • Tools: binary_to_compressed_c: Avoid ?? trigraphs sequences in string outputs which break some older compilers. (#839)
  • Demo: Added an extra 3-way columns demo.
  • Demo: ShowStyleEditor: show font character map / grid in more details.
  • Demo: Console: Fixed a completion bug when multiple candidates are equals and match until the end.
  • Demo: Fixed 1-byte off overflow in the ShowStyleEditor() combo usage. (#783) [@bear24rw]
  • Examples: Accessing ImVector fields directly, feel less stl-ey. (#810)
  • Examples: OpenGL*: Saving/restoring existing scissor rectangle for completeness. (#807)
  • Examples: OpenGL*: Saving/restoring active texture number (the value modified by glActiveTexture). (#1087, #1088, #1116)
  • Examples: OpenGL*: Saving/restoring separate color/alpha blend functions correctly. (#1120) [@greggman]
  • Examples: OpenGL2: Uploading font texture as RGBA32 to increase compatibility with users shaders for beginners. (#824)
  • Examples: Vulkan: Countless fixes and improvements. (#785, #804, #910, #1017, #1039, #1041, #1042, #1043, #1080) [@martty, @Loftilus, @ParticlePeter, @SaschaWillems]
  • Examples: DirectX9/10/10: Only call SetCursor(NULL) is io.MouseDrawCursor is set. (#585, #909)
  • Examples: DirectX9: Explicitely setting viewport to match that other examples are doing. (#937)
  • Examples: GLFW+OpenGL3: Fixed Shutdown() calling GL functions with NULL parameters if NewFrame was never called. (#800)
  • Examples: GLFW+OpenGL2: Renaming opengl_example/ to opengl2_example/ for clarity.
  • Examples: SDL+OpenGL: explicitly setting GL_UNPACK_ROW_LENGTH to reduce issues because SDL changes it. (#752)
  • Examples: SDL2: Added build .bat files for Win32.
  • Added various links to language/engine bindings.
  • Various other minor fixes, tweaks, comments, optimizations.

Gallery

See more here > #973

Thorium 3d

FishEngine

OpenBoardView

Animation editor

Boundless

Wonder Boy: The Dragon's Trap

Overgrowth

Recognition Robotics