Skip to content

Releases: ocornut/imgui

v1.68

19 Feb 12:03
Compare
Choose a tag to compare

This is a general release, keeping with the beat of having more frequent, smaller releases. Reading the full changelog is a good way to keep up to date with the things dear imgui has to offer, and maybe will give you ideas of features to explore that you've been ignoring until now!


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.
Issues and support: https://github.com/ocornut/imgui/issues
Technical support for new users: https://discourse.dearimgui.org (also search in GitHub Issues)

image

Thank you

Some ongoing work on dear imgui is currently being sponsored by Blizzard Entertainment + general & community work by many individual users, hobbyists and studios via e.g. Patreon or support contracts. See the readme for details. Huge thank you to all of you, past and present supporters! You help is very meaningful.

TL;DR;

  • Added ImDrawData::FramebufferScale to facilitate future support for multiple-viewport over multiple screen with varying retina scale factor (prefer using instead of io.DisplayFramebufferScale!
  • Added ImGui::IsItemActivated().
  • Added ImGuiTabBarFlags_TabListPopupButton flag.
  • Added ImGuiStyle::SelectableTextAlign.
  • Examples: Win32: Added support for XInput gamepad (if ImGuiConfigFlags_NavEnableGamepad is enabled).
  • Dozens of bug fixes and other improvements.

Breaking Changes

  • Made it illegal/assert when io.DisplayTime == 0.0f (with an exception for the first frame). This shouldn't affect you unless for some reason your time step calculation lack precision and give you a zero value, in which case you may e.g. replace it with a dummy small value. Because that replacement would be arbitrary we currently don't try to do it on dear imgui's side.
  • Removed io.DisplayVisibleMin/DisplayVisibleMax (which were marked obsolete and removed from viewport/docking branch already).

Other Changes:

  • Added .editorconfig file for text editors to standardize using spaces. (#2038) [@kudaba]
  • ImDrawData: Added FramebufferScale field (currently a copy of the value from io.DisplayFramebufferScale). This is to allow render functions being written without pulling any data from ImGuiIO, allowing incoming multi-viewport feature to behave on Retina display and with multiple displays.
    If you are not using a custom binding, please update your render function code ahead of time, and use draw_data->FramebufferScale instead of io.DisplayFramebufferScale. (#2306, #1676)
  • Added IsItemActivated() as an extension to the IsItemDeactivated/IsItemDeactivatedAfterEdit functions
    which are useful to implement variety of undo patterns. (#820, #956, #1875)
  • InputText: Fixed a bug where ESCAPE would not restore the initial value in all situations. (#2321) [@relick]
  • InputText: Fixed a bug where ESCAPE would be first captured by the Keyboard Navigation code. (#2321, #787)
  • InputText: Fixed redo buffer exhaustion handling (rare) which could corrupt the undo character buffer. The way the redo/undo buffers work would have made it generally unnoticeable to the user. (#2333)
  • Fixed range-version of PushID() and GetID() not honoring the "###" operator to restart from the seed value.
  • Fixed CloseCurrentPopup() on a child-menu of a modal incorrectly closing the modal. (#2308)
  • Tabs: Added ImGuiTabBarFlags_TabListPopupButton flag to show a popup button on manual tab bars. (#261, #351)
  • Tabs: Removed ImGuiTabBarFlags_NoTabListPopupButton which was available in 1.67, but not documented and actually had zero use (taking the liberty of not listing this in breaking change since it was thoroughly unused).
  • Tabs: Fixed a minor clipping glitch when changing style's FramePadding from frame to frame.
  • Tabs: Fixed border (when enabled) so it is aligned correctly mid-pixel and appears as bright as other borders.
  • Style, Selectable: Added ImGuiStyle::SelectableTextAlign and ImGuiStyleVar_SelectableTextAlign. (#2347) [@haldean]
  • Menus: Tweaked horizontal overlap between parent and child menu (to help convey relative depth) from using style.ItemSpacing.x to style.ItemInnerSpacing.x, the later being expected to be smaller. (#1086)
  • RadioButton: Fixed label horizontal alignment to precisely match Checkbox().
  • Window: When resizing from an edge, the border is more visible and better follow the rounded corners.
  • Window: Fixed initial width of collapsed windows not taking account of contents width (broken in 1.67). (#2336, #176)
  • Scrollbar: Fade out and disable interaction when too small, in order to facilitate using the resize grab on very small window, as well as reducing visual noise/overlap.
  • ListBox: Better optimized when clipped / non-visible.
  • InputTextMultiline: Better optimized when clipped / non-visible.
  • Font: Fixed high-level ImGui::CalcTextSize() used by most widgets from erroneously subtracting 1.0f*scale to calculated text width. Among noticeable side-effects, it would make sequences of repeated Text/SameLine calls not align the same as a single call, and create mismatch between high-level size calculation and those performed with the lower-level ImDrawList api. (#792) [@SlNPacifist]
  • Font: Fixed building atlas when specifying duplicate/overlapping ranges within a same font. (#2353, #2233)
  • ImDrawList: Fixed AddCircle(), AddCircleFilled() angle step being off, which was visible when drawing a "circle" with a small number of segments (e.g. an hexagon). (#2287) [@baktery]
  • ImGuiTextBuffer: Added append() function (unformatted).
  • ImFontAtlas: Added 0x2000-0x206F general punctuation range to default ChineseFull / ChineseSimplifiedCommon ranges. (#2093)
  • ImFontAtlas: FreeType: Added support for imgui allocators + custom FreeType only SetAllocatorFunctions. (#2285) [@Vuhdo]
  • ImFontAtlas: FreeType: Fixed using imgui_freetype.cpp in unity builds. (#2302)
  • Demo: Fixed "Log" demo not initializing properly, leading to the first line not showing before a Clear. (#2318) [@bluescan]
  • Demo: Added "Auto-scroll" option in Log/Console demos. (#2300) [@nicolasnoble, @ocornut]
  • Examples: Metal, OpenGL2, OpenGL3, Vulkan: Fixed offsetting of clipping rectangle with ImDrawData::DisplayPos != (0,0) when the display frame-buffer scale scale is not (1,1). While this doesn't make a difference when using master branch, this is effectively fixing support for multi-viewport with Mac Retina Displays on those examples. (#2306) [@rasky, @ocornut]
    Also using ImDrawData::FramebufferScale instead of io.DisplayFramebufferScale.
  • Examples: Clarified the use the ImDrawData::DisplayPos to offset clipping rectangles.
  • Examples: Win32: Using GetForegroundWindow()+IsChild() instead of GetActiveWindow() to be compatible with windows created in a different thread or parent. (#1951, #2087, #2156, #2232) [many people]
  • Examples: SDL: Using the SDL_WINDOW_ALLOW_HIGHDPI flag. (#2306, #1676) [@rasky]
  • Examples: Win32: Added support for XInput gamepad (if ImGuiConfigFlags_NavEnableGamepad is enabled).
  • Examples: Win32: Added support for mouse buttons 4 and 5 via WM_XBUTTON* messages. (#2264)
  • Examples: DirectX9: Explicitly disable fog (D3DRS_FOGENABLE) before drawing in case user state has it set. (#2288, #2230)
  • Examples: OpenGL2: Added #define GL_SILENCE_DEPRECATION to cope with newer XCode warnings.
  • Examples: OpenGL3: Using GLSL 4.10 shaders for any GLSL version over 410 (e.g. 430, 450). (#2329) [@BrutPitt]

I want more!

The docking (#2109) and multi-viewport (#1542) features are available in the docking branch, actively being used by dozens of teams. Your continuous feedback is always appreciated. Multi-viewport in particular needs help on Linux and Mac (#2117). There's a CMake pull-request (#1713).

Gallery

Imogen by @CedricGuillemet
68747470733a2f2f692e696d6775722e636f6d2f7351664f3542722e706e67

RemedyBG

RemedyBG is a 64-bit Windows debugger written from scratch with the goal of replacing the behemoth Visual Studio debugger.

remedybg-01

imgui_markdown.h

Single-header file for Markdown rendering.

imgui_markdown_avoyd_about_oss

GPU profiler at game studio Endroad
gpuprofiler

(Right-side) VJ software based on imgui & openFrameworks, by @yumataesu
Also see GIF.
dwxpuxsu0aar02i jpg large

v1.67

15 Jan 14:11
Compare
Choose a tag to compare

Happy new year!

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.
Issues: https://github.com/ocornut/imgui/issues
Technical support for new users: https://discourse.dearimgui.org (also search in GitHub Issues)

Next morning hotfix: A previous tag for the 1.67 release pointed to commit 7a5058e it is now pointing d38d7c6 (two commits later) including a fix for when using multiple append calls to BeginChild/EndChild.

Thank you

Some ongoing work on dear imgui is currently being sponsored by Blizzard Entertainment + general & community work by many 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.

TL;DR;

  • Added Tab Bar api. This was extracted from the Docking branch (#2109) which is its primary user. You can now uses programatically created tabs without relying on Docking.
  • Fixes and optimizations to the font atlas builder (both stb_truetype and freetype versions).
  • Resizing windows from edge is now enabled by default if the backend supports mouse cursors shapes.
  • About 20% faster in typical debug/unoptimized builds.
  • A dozen of other additions and fixes (in gamepad/keyboard navigation, DragFloat, auto-resizing windows uncollapsing, ImGuiWindowFlags_UnsavedDocument, io.ConfigWindowsMoveFromTitleBarOnly, io.AddInputCharacter, etc. read details below).

(Demo->Layout->Tabs and Demo->Examples->Documents)
image

(Demo->Examples->Documents)
imgui_capture_0002

Breaking Changes

  • Made it illegal to call Begin("") with an empty string. This somehow accidentally worked before but had various undesirable side-effect as the window would have ID zero. In particular it is causing problems in viewport/docking branches.
  • Renamed io.ConfigResizeWindowsFromEdges to io.ConfigWindowsResizeFromEdges and removed its [Beta] mark. The addition of new configuration options in the Docking branch is pushing for a little reorganization of those names.
  • Renamed ImFontAtlas::GlyphRangesBuilder to ImFontGlyphRangesBuilder. Keep redirection typedef (will obsolete).

Other Changes:

  • Added BETA api for Tab Bar/Tabs widgets: (#261, #351)
    • Added BeginTabBar(), EndTabBar(), BeginTabItem(), EndTabItem(), SetTabItemClosed() API.
    • Added ImGuiTabBarFlags flags for BeginTabBar() (currently has 8 options).
    • Added ImGuiTabItemFlags flags for BeginTabItem() (currently has 4 options).
    • Style: Added ImGuiCol_Tab, ImGuiCol_TabHovered, ImGuiCol_TabActive, ImGuiCol_TabUnfocused, ImGuiCol_TabUnfocusedActive colors.
    • Demo: Added Layout->Tabs demo code.
    • Demo: Added "Documents" example app showcasing possible use for tabs. This feature was merged from the Docking branch in order to allow the use of regular tabs in your code. (It does not provide the docking/splitting/merging of windows available in the Docking branch)
  • Added ImGuiWindowFlags_UnsavedDocument window flag to append '*' to title without altering the ID, as a convenience to avoid using the ### operator. In the Docking branch this also has an effect on tab closing behavior.
  • Window, Focus, Popup: Fixed an issue where closing a popup by clicking another window with the _NoMove flag would refocus the parent window of the popup instead of the newly clicked window.
  • Window: Contents size is preserved while a window collapsed. Fix auto-resizing window losing their size for one frame when uncollapsed.
  • Window: Contents size is preserved while a window contents is hidden (unless it is hidden for resizing purpose).
  • Window: Resizing windows from edge is now enabled by default (io.ConfigWindowsResizeFromEdges=true). Note that it only works if the back-end sets ImGuiBackendFlags_HasMouseCursors, which the standard back-ends do.
  • Window: Added io.ConfigWindowsMoveFromTitleBarOnly option. This is ignored by window with no title bars (often popups). This affects clamping window within the visible area: with this option enabled title bars need to be visible. (#899)
  • Window: Fixed using SetNextWindowPos() on a child window (which wasn't really documented) position the cursor as expected in the parent window, so there is no mismatch between the layout in parent and the position of the child window.
  • InputFloat: When using ImGuiInputTextFlags_ReadOnly the step buttons are disabled. (#2257)
  • DragFloat: Fixed broken mouse direction change with power!=1.0. (#2174, #2206) [@Joshhua5]
  • Nav: Fixed an keyboard issue where holding Activate/Space for longer than two frames on a button would unnecessary keep the focus on the parent window, which could steal it from newly appearing windows. (#787)
  • Nav: Fixed animated window titles from being updated when displayed in the CTRL+Tab list. (#787)
  • Error recovery: Extraneous/undesired calls to End() are now being caught by an assert in the End() function closer to the user call site (instead of being reported in EndFrame). Past the assert, they don't lead to crashes any more. (#1651). Missing calls to End(), past the assert, should not lead to crashes or to the fallback Debug window appearing on screen. Those changes makes it easier to integrate dear imgui with a scripting language allowing, given asserts are redirected into e.g. an error log and stopping the script execution.
  • ImFontAtlas: Stb and FreeType: Atlas width is now properly based on total surface rather than glyph count (unless overridden with TexDesiredWidth).
  • ImFontAtlas: Stb and FreeType: Fixed atlas builder so missing glyphs won't influence the atlas texture width. (#2233)
  • ImFontAtlas: Stb and FreeType: Fixed atlas builder so duplicate glyphs (when merging fonts) won't be included in the rasterized atlas.
  • ImFontAtlas: FreeType: Fixed abnormally high atlas height.
  • ImFontAtlas: FreeType: Fixed support for any values of TexGlyphPadding (not just only 1).
  • ImDrawList: Optimized some of the functions for performance of debug builds where non-inline function call cost are non-negligible. (Our test UI scene on VS2015 Debug Win64 with /RTC1 went ~5.9 ms -> ~4.9 ms. In Release same scene stays at ~0.3 ms.)
  • IO: Added io.BackendPlatformUserData, io.BackendRendererUserData, io.BackendLanguageUserData void* for storage use by back-ends.
  • IO: Renamed InputCharacters[], marked internal as was always intended. Please don't access directly, and use AddInputCharacter() instead!
  • IO: AddInputCharacter() goes into a queue which can receive as many characters as needed during the frame. This is useful for automation to not have an upper limit on typing speed. Will later transition key/mouse to use the event queue later.
  • Style: Tweaked default value of style.DisplayWindowPadding from (20,20) to (19,19) so the default style as a value which is the same as the title bar height.
  • Demo: "Simple Layout" and "Style Editor" are now using tabs.
  • Demo: Added a few more things under "Child windows" (changing ImGuiCol_ChildBg, positioning child, using IsItemHovered after a child).
  • Examples: DirectX10/11/12: Made imgui_impl_dx10/dx11/dx12.cpp link d3dcompiler.lib from the .cpp file to ease integration.
  • Examples: Allegro 5: Properly destroy globals on shutdown to allow for restart. (#2262) [@Domre]

I want more!

The docking (#2109) and multi-viewport (#1542) features are actively being used by dozens of teams. Your continuous feedback is always appreciated. Multi-viewport in particular needs help on Linux and Mac (#2117).
There's a CMake pull-request (#1713).

Gallery

Zep (text editor widget) by @cmaughan
sample

glChAoS.P by @BrutPitt
sshot_201917_6158

Internal tooling for Crossout by Targem Games
crossout

C64 style by @Nullious (font, colors)
c64 imgui

v1.66b

03 Dec 11:02
Compare
Choose a tag to compare

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;

Releasing this as a hot-fix as 1.66 suffered from one problematic regression: one of the code-path for rendering large blocks of text (from 10k characters) was buggy. Although it didn't affect functions like TextUnformatted(), it would affect the display when using InputText() on a buffer larger than 10k (some characters would not be displayed or displayed in a wrong position) or calling the low-level ImDrawList::AddText() function with large string.

In addition, the About Window previously available from the Demo Window was promoted to a function ShowAboutWindow() and it now display various system information (compiler, imgui configuration, list of enabled features, etc.). When discussing issues on a forum post, posting the content of this box will help communicate important information across.

Reminder: 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. Avoid modifying imgui cpp files, if you do please communicate/discuss your changes so we can think of a solution to avoid it.

Changes

  • Fixed a text rendering/clipping bug introduced in 1.66 (on 2018-10-12, commit ede3a3b) that affect single ImDrawList::AddText() calls with single strings larger than 10k. Text/TextUnformatted() calls were not affected, but e.g. InputText() was. [@pdoane]
  • When the focused window become inactive don't restore focus to a window with the ImGuiWindowFlags_NoInputs flag. (#2213) [@zzzyap]
  • Added io.BackendPlatformName/io.BackendRendererName fields to optionally describe the back-end. Setting them up in the Examples back-ends, so it can be displayed in the About window.
  • Separator: Fixed Separator() outputting an extraneous empty line when captured into clipboard/text/file.
  • Demo: Added ShowAboutWindow() call, previously was only accessible from the demo window.
  • Demo: ShowAboutWindow() now display various Build/Config Information (compiler, os, etc.) that can easily be copied into bug reports.
  • Fixed build issue with osxcross and macOS. (#2218) [@dos1]
  • Examples: SDL: changed the signature of ImGui_ImplSDL2_ProcessEvent() to use a const SDL_Event*. (#2187)

ShowAboutWindow():
image

v1.66

22 Nov 14:37
Compare
Choose a tag to compare

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 small release with all changes applied to master since September.
Please note that most of the recent works has been happening in the Viewport (#1542) and Docking (#2109) branches. The Docking branch already have dozens of active users and feedback on it is always welcome.

  • New functions/features: ImGuiWindowFlags_NoBackground, ImGuiWindowFlags_NoDecoration, ImGuiWindowFlags_NoMouseInputs, ImGui::GetDragDropPayload().
  • Bindings: Fixes for GL 4.5 contexts using glClipControl(). Chaining GLFW callbacks automatically. Fixes when using IMGUI_IMPL_OPENGL_LOADER_CUSTOM. SDL+Vulkan: Fix shutdown on Linux.
  • Many other fixes and improvements, read below for details.

Reminder: 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.

Thank you

Some ongoing work on dear imgui is currently being sponsored by Blizzard Entertainment + general & community work by many 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.

Breaking Changes

  • Renamed SetScrollHere() to SetScrollHereY(). Kept redirection function (will obsolete).
  • Renamed misc/stl/imgui_stl.* to misc/cpp/imgui_stdlib.* in prevision for other C++ helper files. (#2035, #2096)

Other Changes:

  • Fixed calling SetNextWindowSize()/SetWindowSize() with non-integer values leading to accidental alteration of window position. We now round the provided size. (#2067)
  • Fixed calling DestroyContext() always saving .ini data with the current context instead of the supplied context pointer. (#2066)
  • Nav, Focus: Fixed ImGuiWindowFlags_NoBringToFrontOnFocus windows not being restoring focus properly after the main menu bar or last focused window is deactivated.
  • Nav: Fixed an assert in certain circumstance (mostly when using popups) when mouse positions stop being valid. (#2168)
  • Nav: Fixed explicit directional input not re-highlighting current nav item if there is a single item in the window and highlight has been previously disabled by the mouse. (#787)
  • DragFloat: Fixed a situation where dragging with value rounding enabled or with a power curve erroneously wrapped the value to one of the min/max edge. (#2024, #708, #320, #2075).
  • DragFloat: Disabled using power curve when one edge is FLT_MAX (broken in 1.61). (#2024)
  • DragFloat: Disabled setting a default drag speed when one edge is FLT_MAX. (#2024)
  • SliderAngle: Added optional format argument to alter precision or localize the string. (#2150) [@podsvirov]
  • Window: Resizing from edges (with io.ConfigResizeWindowsFromEdges Beta flag) extends the hit region of root floating windows outside the window, making it easier to resize windows. Resize grips are also extended accordingly so there are no discontinuity when hovering between borders and corners. (#1495, #822)
  • Window: Added ImGuiWindowFlags_NoBackground flag to avoid rendering window background. This is mostly to allow the creation of new flag combinations, as we could already use SetNextWindowBgAlpha(0.0f). (#1660) [@biojppm, @ocornut]
  • Window: Added ImGuiWindowFlags_NoDecoration helper flag which is essentially NoTitleBar+NoResize+NoScrollbar+NoCollapse.
  • Window: Added ImGuiWindowFlags_NoMouseInputs which is basically the old ImGuiWindowFlags_NoInputs (essentially we have renamed ImGuiWindowFlags_NoInputs to ImGuiWindowFlags_NoMouseInputs). Made the new ImGuiWindowFlags_NoInputs encompass both NoMouseInputs+NoNav, which is consistent with its description. (#1660, #787)
  • Window, Inputs: Fixed resizing from edges when io.MousePos is not pixel-rounded by rounding mouse position input. (#2110)
  • BeginChild(): Fixed BeginChild(const char*, ...) variation erroneously not applying the ID stack to the provided string to uniquely identify the child window. This was undoing an intentional change introduced in 1.50 and broken in 1.60. (#1698, #894, #713).
  • TextUnformatted(): Fixed a case where large-text path would read bytes past the text_end marker depending on the position of new lines in the buffer (it wasn't affecting the output but still not the right thing to do!)
  • ListBox(): Fixed frame sizing when items_count==1 unnecessarily showing a scrollbar. (#2173) [@luk1337, @ocornut]
  • ListBox(): Tweaked frame sizing so list boxes will look more consistent when FramePadding is far from ItemSpacing.
  • RenderText(): Some optimization for very large text buffers, useful for non-optimized builds.
  • BeginMenu(): Fixed menu popup horizontal offset being off the item in the menu bar when WindowPadding=0.0f.
  • ArrowButton(): Fixed arrow shape being horizontally misaligned by (FramePadding.y-FramePadding.x) if they are different.
  • Demo: Split the contents of ShowDemoWindow() into smaller functions as it appears to speed up link time with VS. (#2152)
  • Drag and Drop: Added GetDragDropPayload() to peek directly into the payload (if any) from anywhere. (#143)
  • ImGuiTextBuffer: Avoid heap allocation when empty.
  • ImDrawList: Fixed AddConvexPolyFilled() undefined behavior when passing points_count smaller than 3,
    in particular, points_count==0 could lead to a memory stomp if the draw list was previously empty.
  • Examples: DirectX10, DirectX11: Removed seemingly unnecessary calls to invalidate and recreate device objects
    in the WM_SIZE handler. (#2088) [@ice1000]
  • Examples: GLFW: User previously installed GLFW callbacks are now saved and chain-called by the default callbacks. (#1759)
  • Examples: OpenGL3: Added support for GL 4.5's glClipControl(GL_UPPER_LEFT). (#2186)
  • Examples: OpenGL3+GLFW: Fixed error condition when using the GLAD loader. (#2157) [@blackball]
  • Examples: OpenGL3+GLFW/SDL: Made main.cpp compile with IMGUI_IMPL_OPENGL_LOADER_CUSTOM (may be missing init). (#2178) [@doug-moen]
  • Examples: SDL2+Vulkan: Fixed application shutdown which could deadlock on Linux + Xorg. (#2181) [@eRabbit0]

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: Quotes & Software using dear imgui.

Imogen by @CedricGuillemet
imogen

Unnamed Editor by @rokups (using docking branch)
kd29jbn

Zepto8: A PICO-8 emulator and IDE by @samhocevar (using docking branch)
zepto8

Profiler UI in Lumix Engine by @nem0
image

Unnamed Editor/test-bed by @r-lyeh
47254043-53a1ea00-d45c-11e8-97c9-335de68c5ee7

TimeLord
timelord

v1.65

06 Sep 14:06
Compare
Choose a tag to compare

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]

v1.64

31 Aug 16:13
Compare
Choose a tag to compare

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.

v1.63

29 Aug 15:42
Compare
Choose a tag to compare

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 to io.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() fr...
Read more

v1.62

22 Jun 15:55
Compare
Choose a tag to compare

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...
Read more

v1.61

14 May 11:10
Compare
Choose a tag to compare

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 ...
Read more

v1.60

09 Apr 11:58
Compare
Choose a tag to compare

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. R...
Read more