Skip to content

Releases: ocornut/imgui

v1.53

25 Dec 17:27
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.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 uniqu...
Read more

v1.52

27 Oct 15:46
Compare
Choose a tag to compare

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

v1.51

24 Aug 16:45
Compare
Choose a tag to compare

v1.51: pick all the colors!

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

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

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

picker_options

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

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

memory editor

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

Support future development of dear imgui

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

Patreon: Patreon PayPal: PayPal

How to update

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

Breaking Changes

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

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

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

Other Changes

  • Added flags to ColorEdit3(), ColorEdit4(). The color edit widget now has a context-menu and access to the color picker. (#346)
  • Added flags to ColorButton(). (#346)
  • Added ColorPicker3(), ColorPicker4(). The API along with those of the updated ColorEdit4() was designed so you may use them in various situation and hopefully compose your own picker if required. There are a bunch of available flags, check the Demo window and comment for ImGuiColorEditFlags_. Some of the options it supports are: two color picker types (hue bar + sat/val rectangle, hue wheel + rotating sat/val triangle), display as u8 or float, lifting 0.0..1.0 constraints (currently rgba only), context menus, alpha bar, background checkerboard options, preview tooltip, basic revert. For simple use, calling the existing ColorEdit4() function as you did before will be enough, as you can now open the color picker from there. (#346) [@r-lyeh, @nem0, @thennequin, @dariomanesku and @ocornut]
  • Added SetColorEditOptions() to set default color options (e.g. if you want HSV over RGBA, float over u8, select a default picker mode etc. at startup time without a user intervention. Note that the user can still change options with the context menu unless disabled with ImGuiColorFlags_NoOptions or explicitly enforcing a display type/picker mode etc.).
  • Added user-facing IsPopupOpen() function. (#891) [@mkeeter]
  • Added GetColorU32(u32) variant that perform the style alpha multiply without a floating-point round trip, and helps makes code more consistent when using ImDrawList APIs.
  • Added PushStyleColor(ImGuiCol idx, ImU32 col) overload.
  • Added GetStyleColorVec4(ImGuiCol idx) which is equivalent to accessing ImGui::GetStyle().Colors[idx] (aka return the raw style color without alpha alteration).
  • ImFontAtlas: Added GlyphRangesBuilder helper class, which makes it easier to build custom glyph ranges from your app/game localization data, or add into existing glyph ranges.
  • ImFontAtlas: Added TexGlyphPadding option. (#1282) [@jadwallis]
  • ImFontAtlas: Made it possible to override size of AddFontDefault() (even if it isn't really recommended!).
  • ImDrawList: Added GetClipRectMin(), GetClipRectMax() helpers.
  • Fixed Ini saving crash if the ImGuiWindowFlags_NoSavedSettings gets removed from a window after its creation (unlikely!). (#1000)
  • Fixed PushID()/PopID() from marking parent window as Accessed (which needlessly woke up the root "Debug" window when used outside of a regular window). (#747)
  • Fixed an assert when calling CloseCurrentPopup() twice in a row. [@nem0]
  • Window size can be loaded from .ini data even if ImGuiWindowFlags_NoResize flag is set. (#1048, #1056)
  • Columns: Added SetColumnWidth(). (#913) [@ggtucker]
  • Columns: Dragging a column preserve its width by default. (#913) [@ggtucker]
  • Columns: Fixed first column appearing wider than others. (#1266)
  • Columns: Fixed allocating space on the right-most side with the assumption of a vertical scrollbar. The space is only allocated when needed...
Read more

v1.50

02 Jun 11:21
Compare
Choose a tag to compare

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

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

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

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

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

imgui-nav-20160821b

Support future development of dear imgui

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

Patreon:

Patreon

PayPal:

PayPal

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

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

How to update

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

Breaking Changes

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

All Changes

  • InputText(): Added support for CTRL+Backspace (delete word).
  • InputText(): OSX uses Super+Arrows for home/end. Add Shortcut+Backspace support. (#650) [@michaelbartnett]
  • InputText(): Got rid of individual OSX-specific options in ImGuiIO, added a single io.OSXBehaviors flag. (#473, #650)
  • InputText(): Fixed pressing home key on last character when it isn't a trailing \n (#588, #815)
  • InputText(): Fixed state corruption/crash bug in stb_textedit.h redo logic when exhausting undo/redo char buffer. (#715. #681)
  • InputTextMultiline(): Fixed Ctrl+DownArrow moving scrolling out of bounds.
  • InputTextMultiline(): Scrollbar fix for when input and latched internal buffers differs in a way that affects vertical scrollbar existence. (#725)
  • ImFormatString(): Fixed an overflow handling bug with implementation of vsnprintf() that do not return -1. (#793)
  • BeginChild(const char*) now applies stack id to provided label, consistent with other widgets. (#894, #713)
  • SameLine() with explicit X position is relative to left of group/columns. (ref #746, #125, #630)
  • SliderInt(), SliderFloat() supports reverse direction (where v_min > v_max). (#854)
  • SliderInt(), SliderFloat() better support for when v_min==v_max. (#919)
  • SliderInt(), SliderFloat() enforces writing back value when interacting, to be consistent with other widgets. (#919)
  • SliderInt, SliderFloat(): Fixed edge case where style.GrabMinSize being bigger than slider width can lead to a division by zero. (#919)
  • Added IsRectVisible() variation with explicit start-end positions. (#768) [@thedmd]
  • Fixed TextUnformatted() clipping bug in the large-text path when horizontal scroll has been applied. (#692, #246)
  • Fixed minor text clipping issue in window title when using font straying above usual line. (#699)
  • Fixed SetCursorScreenPos() fixed not adjusting CursorMaxPos as well.
  • Fixed scrolling offset when using SetScrollY(), SetScrollFromPosY(), SetScrollHere() with menu bar.
  • Fixed using IsItemActive() after EndGroup() or any widget using groups. (#840, #479)
  • Fixed IsItemActive() lagging by one frame on initial widget activation. (#840)
  • Fixed Separator() zero-height bounding box resulting in clipping when laying exactly on top line of clipping rectangle (#860)
  • Fixed PlotLines() PlotHistogram() calling with values_count == 0.
  • Fixed clicking on a window's void while staying still overzealously marking .ini settings as dirty. (#923)
  • Fixed assert triggering when a window has zero rendering but has a callback. (#810)
  • Scrollbar: Fixed rendering when sizes are negative to reduce glitches (which can happen with certain style settings and zero WindowMinSize).
  • EndGroup(): Made IsItemHovered() work when an item was activated within the group. (#849)
  • BulletText(): Fixed stopping to display formatted string after the '##' mark.
  • Closing the focused window restore focus to the first active root window in descending z-order .(part of #727)
  • Word-wrapping: Fixed a bug where we never wrapped after a 1 character word. [@sronsse]
  • Word-wrapping: Fixed TextWrapped() overriding wrap position if one is already set. (#690)
  • Word-wrapping: Fixed incorrect testing for negative wrap coordinates, they are perfectly legal. (#706)
  • ImGuiListClipper: fixed automatic-height calc path dumbly having user display element 0 twice. (#661, #716)
  • ImGuiListClipper: Fix to behave within column. (#661, #662, #716)
  • ImDrawList: Renamed ImDrawList::PathFill() to ImDrawList::PathFillConvex() for clarity. (BREAKING API)
  • Columns: End() avoid calling Columns(1) if no columns set is open, not sure why it wasn't the case already (pros: faster, cons: exercise less code).
  • ColorButton(): Fix ColorButton showing wrong hex value for alpha. (#1068) [@codecat]
  • ColorEdit4(): better preserve inputting value out of 0..255 range, display then clamped in Hexadecimal form.
  • Shutdown() clear out some remaining pointers for sanity. (#836)
  • Added IMGUI_USE_BGRA_PACKED_COLOR option in imconfig.h (#767, #844) [@thedmd]
  • Style: Removed the inconsistent shadow under RenderCollapseTriangle() (~#707)
  • Style: Added ButtonTextAlign, ImGuiStyleVar_ButtonTextAlign. (#842)
  • ImFont: Allowing to use up to 0xFFFE glyphs in same font (increased from previous 0x8000).
  • ImFont: Added GetGlyphRangesThai() helper. [@nProtect]
  • ImFont: CalcWordWrapPositionA() fixed font scaling with fallback character.
  • ImFont: Calculate and store the approximate texture surface to get an idea of how costly ea...
Read more

v1.49

29 May 20:36
Compare
Choose a tag to compare

v1.49 release

Accumulation of various things! Try to stay vaguely up to date!
See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.

Recognition Robotics software with remoteimgui ( https://recognitionrobotics.com/ )
childwindows
Scroll down for more user screenshots or see the screenshot threads (#539)

Patreon

Breaking Changes

  • Renamed SetNextTreeNodeOpened() to SetNextTreeNodeOpen() for consistency, no redirection.
  • Removed confusing set of GetInternalState(), GetInternalStateSize(), SetInternalState() functions. Now using CreateContext(), DestroyContext(), GetCurrentContext(), SetCurrentContext(). If you were using multiple contexts the change should be obvious and trivial.
  • Obsoleted old signature of CollapsingHeader(const char* label, const char* str_id = NULL, bool display_frame = true, bool default_open = false), as extra parameters were badly designed and rarely used. Most uses were using 1 parameter and shouldn't affect you. You can replace the "default_open = true" flag in new API with CollapsingHeader(label, ImGuiTreeNodeFlags_DefaultOpen).
  • Changed ImDrawList::PushClipRect(ImVec4 rect) to ImDraw::PushClipRect(Imvec2 min,ImVec2 max,bool intersect_with_current_clip_rect=false). Note that higher-level ImGui::PushClipRect() is preferable because it will clip at logic/widget level, whereas ImDrawList::PushClipRect() only affect your renderer.
  • Title bar (using ImGuiCol_TitleBg/ImGuiCol_TitleBgActive colors) isn't rendered over a window background (ImGuiCol_WindowBg color) anymore (see #655). If your TitleBg/TitleBgActive alpha was 1.0f or you are using the default theme it will not affect you. However if your TitleBg/TitleBgActive alpha was <1.0f you need to tweak your custom theme to readjust for the fact that we don't draw a WindowBg background behind the title bar.
    This helper function will convert an old TitleBg/TitleBgActive color into a new one with the same visual output, given the OLD color and the OLD WindowBg color. (Or If this is confusing, just pick the RGB value from title bar from an old screenshot and apply this as TitleBg/TitleBgActive. Or you may just create TitleBgActive from a tweaked TitleBg color.)
ImVec4 ConvertTitleBgCol(const ImVec4& win_bg_col, const ImVec4& title_bg_col)
{
    float new_a = 1.0f - ((1.0f - win_bg_col.w) * (1.0f - title_bg_col.w));
    float k = title_bg_col.w / new_a;
    return ImVec4((win_bg_col.x * win_bg_col.w + title_bg_col.x) * k, (win_bg_col.y * win_bg_col.w + title_bg_col.y) * k, (win_bg_col.z * win_bg_col.w + title_bg_col.z) * k, new_a);
 }

All changes

  • New version of ImGuiListClipper helper calculates item height automatically. See comments and demo code. (#662, #661, #660)
  • Added SetNextWindowSizeConstraints() to enable basic min/max and programmatic size constraints on window. Added demo. (#668)
  • Added PushClipRect()/PopClipRect() (previously part of imgui_internal.h). Changed ImDrawList::PushClipRect() prototype. (#610)
  • Added IsRootWindowOrAnyChildHovered() helper. (#615)
  • Added TreeNodeEx() functions. (#581, #600, #190)
  • Added ImGuiTreeNodeFlags_Selected flag to display treenode as "selected". (#581, #190)
  • Added ImGuiTreeNodeFlags_AllowOverlapMode flag. (#600)
  • Added ImGuiTreeNodeFlags_NoTreePushOnOpen flag (#590).
  • Added ImGuiTreeNodeFlags_NoAutoOpenOnLog flag (previously private).
  • Added ImGuiTreeNodeFlags_DefaultOpen flag (previously private).
  • Added ImGuiTreeNodeFlags_OpenOnDoubleClick flag.
  • Added ImGuiTreeNodeFlags_OpenOnArrow flag.
  • Added ImGuiTreeNodeFlags_Leaf flag, always opened, no arrow, for convenience. For simple use case prefer using TreeAdvanceToLabelPos()+Text().
  • Added ImGuiTreeNodeFlags_Bullet flag, to add a bullet to Leaf node or replace Arrow with a bullet.
  • Added TreeAdvanceToLabelPos(), GetTreeNodeToLabelSpacing() helpers. (#581, #324)
  • Added CreateContext()/DestroyContext()/GetCurrentContext()/SetCurrentContext(). Obsoleted nearly identical GetInternalState()/SetInternalState() functions. (#586, #269)
  • Added NewLine() to undo a SameLine() and as a shy reminder that horizontal layout support hasn't been implemented yet.
  • Added IsItemClicked() helper. (#581)
  • Added CollapsingHeader() variant with close button. (#600)
  • Fixed MenuBar missing lower border when borders are enabled.
  • InputText(): Fixed clipping of cursor rendering in case it gets out of the box (which can be forced w/ ImGuiInputTextFlags_NoHorizontalScroll. (#601)
  • Style: Changed default IndentSpacing from 22 to 21. (#581, #324)
  • Style: Fixed TitleBg/TitleBgActive color being rendered above WindowBg color, which was inconsistent and causing visual artefact. (#655)
    This broke the meaning of TitleBg and TitleBgActive. Only affect values where Alpha<1.0f. Fixed default theme. Read comments in "API BREAKING CHANGES" section to convert.
  • Relative rendering of order of Child windows creation is preserved, to allow more control with overlapping childs. (#595)
  • Fixed GetWindowContentRegionMax() being off by ScrollbarSize amount when explicit SizeContents is set.
  • Indent(), Unindent(): optional non-default indenting width. (#324, #581)
  • Bullet(), BulletText(): Slightly bigger. Less polygons.
  • ButtonBehavior(): fixed subtle old bug when a repeating button would also return true on mouse release (barely noticeable unless RepeatRate is set to be very slow). (#656)
  • BeginMenu(): a menu that becomes disabled while open gets closed down, facilitate user's code. (#126)
  • BeginGroup(): fixed using within Columns set. (#630)
  • Fixed a lag in reading the currently hovered window when dragging a window. (#635)
  • Obsoleted 4 parameters version of CollapsingHeader(). Refactored code into TreeNodeBehavior. (#600, #579)
  • Scrollbar: minor fix for top-right rounding of scrollbar background when window has menubar but no title bar.
  • MenuItem(): checkmark render in disabled color when menu item is disabled.
  • Fixed clipping rectangle floating point representation to ensure renderer-side float point operations yield correct results in typical DirectX/GL settings. (#582, 597)
  • Fixed GetFrontMostModalRootWindow(), fixing missing fade-out when a combo pop was used stacked over a modal window. (#604)
  • ImDrawList: Added AddQuad(), AddQuadFilled() helpers.
  • ImDrawList: AddText() refactor, moving some code to ImFont, reserving less unused vertices when large vertical clipping occurs.
  • ImFont: Added RenderChar() helper.
  • ImFont: Added AddRemapChar() helper. (#609)
  • ImFontConfig: Clarified persistence requirement of GlyphRanges array. (#651)
  • ImGuiStorage: Added bool helper functions for completeness.
  • AddFontFromMemoryCompressedTTF(): Fix font config propagation. (#587)
  • Renamed majority of use of the word "opened" to "open" for clarity. Renamed SetNextTreeNodeOpened() to SetNextTreeNodeOpen(). (#625, #579)
  • Examples: OpenGL3: Saving/restoring glActiveTexture() state. (#602)
  • Examples: DirectX9: save/restore all device state.
  • Examples: DirectX9: Removed dependency on d3dx9.h, d3dx9.lib, dxguid.lib so it can be used in a DirectXMath.h only environment. (#611)
  • Examples: DirectX10/X11: Apply depth-stencil state (no use of depth buffer). (#640, #636)
  • Examples: DirectX11/X11: Added comments on removing dependency on D3DCompiler. (#638)
  • Examples: SDL: Initialize video+timer subsystem only.
  • Examples: Apple/iOS: lowered xcode project deployment target from 10.7 to 10.11. (#598, #575)

Gallery

Some projects using ImGui.

Simple synth test ( https://twitter.com/paniq/status/733391436582912000 )
gui_synth3 mp4_snapshot_00 03_ 2016 05 29_22 22 32

Dubious software
ihssug4

v1.48

09 Apr 16:30
Compare
Choose a tag to compare

End of winter release

Accumulation of various things! Try to stay vaguely up to date!
Click https://github.com/ocornut/imgui to see the project homepage.

Avoyd ( http://www.enkisoftware.com )
cfhonfbweaafsne jpg large
Scroll down for more user screenshots or see the screenshot threads (#539)

Patreon

Breaking Changes

  • Consistently honoring exact width passed to PushItemWidth() (when positive), previously it would add extra FramePadding.x*2 over that width. Some hand-tuned layout may be affected slightly. (#346)
  • Style: removed style.WindowFillAlphaDefault which was confusing and redundant, baked alpha into ImGuiCol_WindowBg color. If you had a custom WindowBg color but didn't change WindowFillAlphaDefault, multiply WindowBg alpha component by 0.7. Renamed ImGuiCol_TooltipBg to ImGuiCol_PopupBG, applies to other types of popups. bg_alpha parameter of 5-parameters version of Begin() is an override. (#337)
  • InputText(): Added BufTextLen field in ImGuiTextEditCallbackData. Requesting user to update it if the buffer is modified in the callback. Added a temporary length-check assert to minimize panic for the 3 people using the callback. (#541)
  • Renamed GetWindowFont() to GetFont(), GetWindowFontSize() to GetFontSize(). Kept inline redirection function (will obsolete). (#340)

All changes

  • Consistently honoring exact width passed to PushItemWidth(), previously it would add extra FramePadding.x*2 over that width. Some hand-tuned layout may be affected slightly. (#346)
  • Fixed clipping of child windows within parent not taking account of child outer clipping boundaries (including scrollbar, etc.). (#506)
  • TextUnformatted(): Fixed rare crash bug with large blurb of text (2k+) not finished with a '\n' and fully above the clipping Y line. (#535)
  • IO: Added 'KeySuper' field to hold Cmd keyboard modifiers for OS X. Updated all examples accordingly. (#473)
  • Added ImGuiWindowFlags_ForceVerticalScrollbar, ImGuiWindowFlags_ForceHorizontalScrollbar flags. (#476)
  • Added IM_COL32 macros to generate a U32 packed color, convenient for direct use of ImDrawList api. (#346)
  • Added GetFontTexUvWhitePixel() helper, convenient for direct use of ImDrawList api.
  • Selectable(): Added ImGuiSelectableFlags_AllowDoubleClick flag to allow user reacting on double-click. (@zapolnov) (#516)
  • Begin(): made the close button explicitly set the boolean to false instead of toggling it. (#499)
  • BeginChild()/EndChild(): fixed incorrect layout to allow widgets submitted after an auto-fitted child window. (#540)
  • BeginChild(): Added ImGuiWindowFlags_AlwaysUseWindowPadding flag to ensure non-bordered child window uses window padding. (#462)
  • Fixed InputTextMultiLine(), ListBox(), BeginChildFrame(), ProgressBar(): outer frame not honoring bordering. (#462, #503)
  • Fixed Image(), ImageButtion() rendering a rectangle 1 px too large on each axis. (#457)
  • SetItemAllowOverlap(): Promoted from imgui_internal.h to public imgui.h api. (#517)
  • Combo(): Right-most button stays highlighted when popup is open.
  • Combo(): Display popup above if there's isn't enough space below / or select largest side. (#505)
  • DragFloat(), SliderFloat(), InputFloat(): fixed cases of erroneously returning true repeatedly after a text input modification (e.g. "0.0" --> "0.000" would keep returning true). (#564)
  • DragFloat(): Always apply value when mouse is held/widget active, so that an always-reseting variable (e.g. non saved local) can be passed.
  • InputText(): OS X friendly behaviors: Word movement uses Alt key; Shortcuts uses Cmd key; Double-clicking text select a single word; Jumping to next word sets cursor to end of current word instead of beginning of current word. (@zhiayang), (#473)
  • InputText(): Added BufTextLen in ImGuiTextEditCallbackData. Requesting user to maintain it if buffer is modified. Zero-ing structure properly before use. (#541)
  • CheckboxFlags(): Added support for testing/setting multiple flags at the same time. (@DMartinek) (#555)
  • TreeNode(), CollapsingHeader() fixed not being able to use "##" sequence in a formatted label.
  • ColorEdit4(): Empty label doesn't add InnerSpacing.x, matching behavior of other widgets. (#346)
  • ColorEdit4(): Removed unnecessary calls to scanf() when idle in hexadecimal edit mode.
  • BeginPopupContextItem(), BeginPopupContextWindow(): added early out optimization.
  • CaptureKeyboardFromApp() / CaptureMouseFromApp(): added argument to allow clearing the capture flag. (#533)
  • ImDrawList: Fixed index-overflow check broken by AddText() casting current index back to ImDrawIdx. (#514)
  • ImDrawList: Fixed incorrect removal of trailing draw command if it is a callback command.
  • ImDrawList: Allow windows with only a callback only to be functional. (#524)
  • ImDrawList: Fixed ImDrawList::AddRect() which used to render a rectangle 1 px too large on each axis. (#457)
  • ImDrawList: Fixed ImDrawList::AddCircle() to fit precisely within bounding box like AddCircleFilled() and AddRectFilled(). (#457)
  • ImDrawList: AddCircle(), AddRect() takes optional thickness parameter.
  • ImDrawList: Added AddTriangle().
  • ImDrawList: Added PrimQuadUV() helper to ease custom rendering of textured quads (require primitive reserve).
  • ImDrawList: Allow AddText(ImFont* font, float font_size, ...) variant to take NULL/0.0f as default.
  • ImFontAtlas: heuristic increase default texture width up for large number of glyphs. (#491)
  • ImTextBuffer: Fixed empty() helper which was utterly broken.
  • Metrics: allow to inspect individual triangles in drawcalls.
  • Demo: added more draw primitives in the Custom Rendering example. (#457)
  • Demo: extra comments and example for PushItemWidth(-1) patterns.
  • Demo: InputText password demo filters out blanks. (#515)
  • Demo: Fixed malloc/free mismatch and leak when destructing demo console, if it has been used. (@fungos) (#536)
  • Demo: plot code doesn't use ImVector to avoid heap allocation and be more friendly to custom allocator users. (#538)
  • Fixed compilation on DragonFly BSD (@mneumann) (#563)
  • Examples: Vulkan: Added a Vulkan example (@Loftilus) (#549)
  • Examples: DX10, DX11: Saving/restoring most device state so dropping render function in your codebase shouldn't have DX device side-effects. (#570)
  • Examples: DX10, DX11: Fixed ImGui_ImplDX??_NewFrame() from recreating device objects if render isn't called (g_pVB not set).
  • Examples: OpenGL3: Fix BindVertexArray/BindBuffer order. (@nlguillemot) (#527)
  • Examples: OpenGL: skip rendering and calling glViewport() if we have zero-fixed buffer. (#486)
  • Examples: SDL2+OpenGL3: Fix context creation options. Made ImGui_ImplSdlGL3_NewFrame() signature match GL2 one. (#468, #463)
  • Examples: SDL2+OpenGL2/3: Fix for high-dpi displays. (@nickgravelyn)
  • Various extra comments and clarification in the code.
  • Various other fixes and optimisations.

Gallery

Projects using ImGui

Virtualkc emulator ( http://floooh.github.io/virtualkc
f7ebafc4-f8e0-11e5-8f12-a037ec9e9b0b

Shinobi editor
cfgu6o6w4aa6y-b jpg large

Material editor thing
imgui_eg2

Lumote editor ( http://www.luminawesome.com )
3f8caedc-f021-11e5-8709-90c8ea7df1c0

TEMU / TPU Emulator ( see blog post http://labs.domipheus.com/blog/dear-imgui-thanks-the-tpu-emulator )
ce3i8ciukaa7i5o jpg large

Visual Designer 3D ( http://www.vd-3d.com )
overview

OdenVR ( http://odenvr.com/ )
55e766f6-d9a4-11e5-9d30-419f0f2576e2

v1.47

25 Dec 22:01
Compare
Choose a tag to compare

progress_bar2

The Christmas Maintenance Release

Bundling changes that happened in the past two months. Some minor additions and mostly a bunch of useful fixes. Thanks to everyone trying to push the library in new directions, reporting issues and suggesting improvements! If you want to get your hands dirty ImGui can use your help (e.g. #435)! Your patronage and donations are also still very helpful.

Why the odd dual naming, "dear imgui" vs "ImGui"?

The library started its life and is best known as "ImGui" only due to the fact that I didn't give it a proper name when I released it. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations. It seemed confusing and unfair to hog the name. To reduce the ambiguity without affecting existing codebases, I have decided on an alternate, longer name "dear imgui" that people can use to refer to this specific library in ambiguous situations. Otherwise, you can just ignore that.

Patreon

  • Minor rebranding "ImGui" -> "dear imgui" as an optional first name to reduce ambiguity with IMGUI term. (#21)
  • Added ProgressBar(). (#333)
  • InputText(): Added ImGuiInputTextFlags_Password mode: hide display, disable logging/copying to clipboard. (#237, #363, #374)
  • Added GetColorU32() helper to retrieve color given enum with global alpha and extra applied.
  • Added ImGuiIO::ClearInputCharacters() superfluous helper.
  • Fixed ImDrawList draw command merging bug where using PopClipRect() along with PushTextureID()/PopTextureID() functions would occasionaly restore an incorrect clipping rectangle.
  • Fixed ImDrawList draw command merging so PushTextureID(XXX)/PopTextureID()/PushTextureID(XXX) sequence are now properly merged.
  • Fixed large popups positioning issues when their contents on either axis is larger than DisplaySize, and WindowPadding < DisplaySafeAreaPadding.
  • Fixed border rendering in various situations when using non-pixel aligned glyphs.
  • Fixed border rendering of windows to always contain the border within the window.
  • Fixed Shutdown() leaking font atlas data if NewFrame() was never called. (#396, #303)
  • Fixed int>void* warnings for 64-bits architectures with fancy warnings enabled.
  • Renamed the dubious Color() helpers to ValueColor() - dangerously named, rarely used and probably to be made obsolete.
  • InputText(): Fixed and better handling of using keyboard while mouse button if being held and dragging. (#429)
  • InputText(): Replace OS IME (Input Method Editor) cursor on top-left when we are not text editing.
  • TreeNode(), CollapsingHeader(), Bullet(), BulletText(): various sizing and layout fixes to better support laying out multiple item with different height on same line. (#414, #282)
  • Begin(): Initial window creation with ImGuiWindowFlags_NoBringToFrontOnFocus flag pushes it at the front of global window list.
  • BeginPopupContextWindow() and BeginPopupContextVoid() reopen window on subsequent click. (#439)
  • ColorEdit4(): Fixed broken tooltip on hovering the color button. (actually fixes #373, #380)
  • ImageButton(): uses FrameRounding up to a maximum of available framing size. (#394)
  • Columns: Fixed bug with indentation within columns, also making code a bit shorter/faster. (#414, #125)
  • Columns: Columns set with no implicit id include the columns count within the id to reduce collisions. (#125)
  • Columns: Removed one unnecessary allocation when columns are not used by a window. (#125)
  • ImFontAtlas: Tweaked GetGlyphRangesJapanese() so it is easier to modify.
  • ImFontAtlas: Updated stb_rect_pack.h to 0.08.
  • Metrics: Fixed computing ImDrawCmd bounding box when the draw buffer have been unindexed.
  • Demo: Added a simple "Property Editor" demo applet. (#125, #414)
  • Demo: Fixed assertion in "Custom Rendering" demo when holding both mouse buttons. (#393)
  • Demo: Lots of extra comments, fixes.
  • Demo: Tweaks to Style Editor.
  • Examples: Not clearing input data/tex data in atlas (will be required for dynamic atlas anyway).
  • Examples: Added /Zi (output debug information) to Win32 batch files.
  • Examples: Various fixes for resizing window and recreating graphic context.
  • Examples: OpenGL2/3: Save/restore viewport as part of default render function. (#392, #441).
  • Examples; OpenGL3: Fixed gl3w.c for Linux when compiled with a C++ compiler. (#411)
  • Examples: DirectX: Removed assumption about Unicode build in example main.cpp. (#399)
  • Examples: DirectX10: Added DirectX10 example. (#424)
  • Examples: DirectX11: Downgraded requirement from shader model 5.0 to 4.0. (#420)
  • Examples: DirectX11: Removed Debug flag from graphics context. (#415)
  • Examples: Added SDL+OpenGL3 example. (#356)

Gallery

Property Editor example

property_editor_2

Projects using ImGui

LuxCode GUI for LuxRender ( http://www.luxrender.net/ )

lux core

Avoyd (game) ( http://www.enkisoftware.com )

6fb30c6e-7c09-11e5-8555-6ff6a9239ce9

Curve Editor from Lumix Engine ( https://github.com/nem0/LumixEngine )

curve editor

v1.46

18 Oct 16:54
Compare
Choose a tag to compare
  • Begin*(): added ImGuiWindowFlags_NoFocusOnAppearing flag. (#314)
  • Begin*(): added ImGuiWindowFlags_NoBringToFrontOnFocus flag.
  • Added GetDrawData() alternative to setting a Render function pointer in ImGuiIO structure.
  • Added SetClipboardText(), GetClipboardText() helper shortcuts that user code can call directly without reading from the ImGuiIO structure (to match MemAlloc/MemFree)
  • Fixed handling of malformed UTF-8 at the end of a non-zero terminated string range.
  • Fixed mouse click detection when passing DeltaTime 0.0. (#338)
  • Fixed IsKeyReleased() and IsMouseReleased() returning true on the first frame.
  • Fixed using SetNextWindow* functions on Modal windows with a ImGuiSetCond_Appearing condition. (#377)
  • IsMouseHoveringRect(): Added 'bool clip' parameter to disable clipping provided rectangle. (#316)
  • InputText(): added ImGuiInputTextFlags_ReadOnly flag. (#211)
  • InputText(): lose cursor/undo-stack when reactivating focus is buffer has changed size.
  • InputText(): fixed ignoring text inputs when ALT or ALTGR are pressed. (#334)
  • InputText(): fixed mouse-dragging not tracking the cursor when text doesn't fit. (#339)
  • InputText(): fixed cursor pixel-perfect alignment when horizontally scrolling.
  • InputText(): fixed crash when passing a buf_size==0 (which can be of use for read-only selectable text boxes). (#360)
  • InputFloat() fixed explicit precision modifier, both display and input were broken.
  • PlotHistogram(): improved rendering of histogram with a lot of values.
  • Dummy(): creates an item so functions such as IsItemHovered() can be used.
  • BeginChildFrame() helper: added the extra_flags parameter.
  • Scrollbar: fixed rounding of background + child window consistenly have ChildWindowBg color under ScrollbarBg fill. (#355).
  • Scrollbar: background color less translucent in default style so it works better when changing background color.
  • Scrollbar: fixed minor rendering offset when borders are enabled. (#365)
  • ImDrawList: fixed 1 leak per ImDrawList using the ChannelsSplit() API (via Columns). (#318)
  • ImDrawList: fixed rectangle rendering glitches with width/height <= 1/2 and rounding enabled.
  • ImDrawList: AddImage() uv parameters default to (0,0) and (1,1).
  • ImFontAtlas: Added TexDesiredWidth and tweaked default cheapo best-width choice. (#327)
  • ImFontAtlas: Added GetGlyphRangesKorean() helper to retrieve unicode ranges for Korean. (#348)
  • ImGuiTextFilter::Draw() helper return bool and build when filter is modified.
  • ImGuiTextBuffer: added c_str() helper.
  • ColorEdit4(): fixed hovering the color button always showing 1.0 alpha. (#373)
  • ColorConvertFloat4ToU32() round the floats instead of truncating them.
  • Window: Fixed window lower-right clipping limit so it plays more friendly with both OpenGL and DirectX coordinates.
  • Internal: Extracted a EndFrame() function out of Render() but kept it internal/private + clarified some asserts. (#335)
  • Internal: Added missing IMGUI_API definitions in imgui_internal.h (#326)
  • Internal: ImLoadFileToMemory() return void* instead of taking void** + allow optional int* file_size.
  • Demo: Horizontal scrollbar demo allows to enable simultanaeous scrollbars on both axises.
  • Tools: binary_to_compressed_c.cpp: added -nocompress option.
  • Examples: Added example for the Marmalade platform.
  • Examples: Added batch files to build Windows examples with VS.
  • Examples: OpenGL3: Saving/restoring more GL state correctly. (#347)
  • Examples: OpenGL2/3: Added msys2/mingw64 target to Makefiles.

Gallery

Projects using ImGui

Goxel https://github.com/guillaumechereau/goxel

screenshot-0

screenshot-1b

LumixEngine https://github.com/nem0/lumixengine

50ffccde-6189-11e5-87a5-261684c3d479

Using invisible buttons to create splitters

ezgif-802187769

v1.45

01 Sep 18:32
Compare
Choose a tag to compare

The horizontal scrolling release!

Patreon

NOTE, POTENTIAL API-BREAKING CHANGES

  • With the addition of better horizontal scrolling primitives I had to make some consistency fixes.
    GetCursorPos() SetCursorPos() GetContentRegionMax() GetWindowContentRegionMin() GetWindowContentRegionMax() are now incorporating the scrolling amount. They were incorrectly not incorporating this amount previously. It PROBABLY shouldn't break anything, but that depends on how you used them. Namely:
    • If you always used SetCursorPos() with values relative to GetCursorPos() there shouldn't be a problem. However if you used absolute coordinates, note that SetCursorPosY(100.0f) will put you at +100 from the initial Y position (which may be scrolled out of the view), NOT at +100 from the window top border. Since there wasn't any official scrolling value on X axis (past just manually moving the cursor) this can only affect you if you used to set absolute coordinates on the Y axis which is hopefully rare/unlikely, and trivial to fix.
    • The value of GetWindowContentRegionMax() isn't necessarily close to GetWindowWidth() if horizontally scrolling. Previously they were roughly interchangeable (roughly because the content region exclude window padding).

horizontal_scrollbar2

Changes

  • Added Horizontal Scrollbar via ImGuiWindowFlags_HorizontalScroll (#246).
  • Added GetScrollX(), GetScrollX(), GetScrollMaxX() apis (#246).
  • Added SetNextWindowContentSize(), SetNextWindowContentWidth() to explicitly set the content size of a window, which define the range of scrollbar. When set explicitly it also define the base value from which widget width are derived.
  • Added IO.WantTextInput telling when ImGui is expecting text input, so that e.g. OS on-screen keyboard can be enabled.
  • Added printf attribute to printf-like text formatting functions (Clang/GCC).
  • Added GetMousePosOnOpeningCurrentPopup() helper.
  • Added GetContentRegionAvailWidth() helper.
  • Malformed UTF-8 data don't terminate string, output 0xFFFD instead (#307).
  • ImDrawList: Added AddBezierCurve(), PathBezierCurveTo() API for cubic bezier curves (#311).
  • ImDrawList: Allow to override ImDrawIdx type (#292).
  • ImDrawList: Added an assert on overflowing index value (#292).
  • ImDrawList: Fixed issues with channels split/merge. Now functional without manually adding a draw cmd. Added comments.
  • ImDrawData: Added ScaleClipRects() helper useful when rendering scaled. (#287).
  • Fixed Bullet() inconsistent layout behaviour when clipped.
  • Fixed IsWindowHovered() not taking account of window hoverability (may be disabled because of a popup).
  • Fixed InvisibleButton() not honoring negative size consistently with other widgets that do so.
  • Fixed OpenPopup() accessing current window, effectively opening "Debug" when called from an empty window stack.
  • TreeNode(): Fixed IsItemHovered() result being inconsistent with interaction visuals (#282).
  • TreeNode(): Fixed mouse interaction padding past the node label being accounted for in layout (#282).
  • BeginChild(): Passing a ImGuiWindowFlags_NoMove inhibits moving parent window from this child.
  • BeginChild() fixed missing rounding for child sizes which leaked into layout and have items misaligned.
  • Begin(): Removed default name = "Debug" parameter. We already have a "Debug" window pushed to the stack in the first place so it's not really a useful default.
  • Begin(): Minor fixes with windows main clipping rectangle (e.g. child window with border).
  • Begin(): Window flags are only read on the first call of the frame. Subsequent calls ignore flags, which allows appending to a window without worryin about flags.
  • InputText(): ignore character input when ctrl/alt are held. (Normally those text input are ignored by most wrappers.) (#279).
  • Demo: Fixed incorrectly formed string passed to Combo (#298).
  • Demo: Added simple Log demo.
  • Demo: Added horizontal scrolling example + enabled in console, log and child examples (#246).
  • Style: made scrollbars rounded by default. Because nice. Minor menu bar background alpha tweak. (#246)
  • Metrics: display indices along with triangles count (#299) and some internal state.
  • ImGuiTextFilter::PassFilter() supports string range. Added [] helper to ImGuiTextBuffer.
  • ImGuiTextFilter::Draw() default parameter width=0.0f for no override, allow override with negative values.
  • Examples: OpenGL2/OpenGL3: fix for retina displays. Default font current lack crispness.
  • Examples: OpenGL2/OpenGL3: save/restore more GL state correctly.
  • Examples: DirectX9/DirectX11: resizing buffers dynamically (#299).
  • Examples: DirectX9/DirectX11: added missing middle mouse button to Windows event handler.
  • Examples: DirectX11: fix for Visual Studio 2015 presumably shipping with an updated version of DX11.
  • Examples: iOS: fixed missing files in project.

Bonus: a proof of concept of building something from the low-level components of ImGui. It's a not really functional demo (missing lots of stuff) but may inspire you to build custom high-level components #306

node_graph_editor

v1.44

08 Aug 14:06
Compare
Choose a tag to compare

The controversial release!

Big cleanup!
imgui.cpp has been split intro extra files: imgui_demo.cpp, imgui_draw.cpp, imgui_internal.h. Add the two extra .cpp to your project or #include them from another .cpp file. (#219)

  • Internal data structure and several useful functions are now exposed in imgui_internal.h. This should make it easier and more natural to extend ImGui. However please note that none of the content in imgui_internal.h is guaranteed for forward-compatibility and code using those types/functions may occasionally break. (#219)
  • All sample code is in imgui_demo.cpp. Please keep this file in your project and consider allowing your code to call the ShowTestWindow() function as defacto guide to ImGui features. It will be stripped out by the linker when unused.
  • Added GetContentRegionAvail() helper (basically GetContentRegionMax() - GetCursorPos()).
  • Added ImGuiWindowFlags_NoInputs for totally input-passthru window.
  • Button(): honor negative size consistently with other widgets that do so (width -100 to align the button 100 pixels before the right-most position of the contents region).
  • InputTextMultiline(): honor negative size consistently with other widgets that do so.
  • Combo() clamp popup to lower edge of visible area.
  • InputInt(): value doesn't pass through an int>float>int casting chain, fix handling lost of precision with "large" integer.
  • InputInt() allow hexadecimal input (awkwardly via ImGuiInputTextFlags_CharsHexadecimal but we will allow format string in InputInt* later)
  • Checkbox(), RadioButton(): fixed scaling of checkbox and radio button for the filling of "active" visual.
  • Columns: never assume horizontal space for scrollbar if NoScrollbar flag is explicitly set.
  • Slider: fixed using FramePadding between frame and grab visual. Scaling that spacing would look odd.
  • Fixed lower-right resize grip hit box not scaling along with its rendered size (#287)
  • ImDrawList: Fixed angles in ImDrawList::PathArcTo(), PathArcToFast() (v1.43) being off by an extra PI for no reason.
  • ImDrawList: Added ImDrawList::AddText() shorthand helper.
  • ImDrawList: Add missing support for anti-aliased thick-lines (#133, also ref #288)
  • ImFontAtlas: Added AddFontFromMemoryCompressedBase85TTF() to load base85 encoded font string. Default font encoded as base85 saves ~100 lines / 26 KB of source code. Added base85 output to the binary_to_compressed_c tool.
  • Build fix for MinGW (#276).
  • Examples: OpenGL3: Fixed running on script core profiles for OSX (#277).
  • Examples: OpenGL3: Simplified code using glBufferData for vertices as well (#277, #278)
  • Examples: DirectX11: Clear font texture view to ensure Release() doesn't get called twice (#290).
  • Updated to stb_truetype 1.07 (back to vanilla version as our minor changes are now in master & fix unlikely assert with odd fonts (#280)