@ocornut ocornut released this Dec 25, 2017 · 1386 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 using SetNextWindowContentSize()`. 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