@ocornut ocornut released this Oct 27, 2017 · 1675 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)