github ocornut/imgui v1.81

latest releases: v1.90.5-docking, v1.90.5, v1.90.4-docking...
3 years ago

Hello!
Reading the changelog is a good way to keep up to date with the things Dear ImGui has to offer, and maybe will give you ideas of some features that you've been ignoring until now!


Homepage: https://github.com/ocornut/imgui
Release notes: https://github.com/ocornut/imgui/releases
Wiki: https://github.com/ocornut/imgui/wiki for bindings, extensions, links, etc.
FAQ: https://www.dearimgui.org/faq/
Discord server: https://discord.dearimgui.org
Issues and support: https://github.com/ocornut/imgui/issues

Did you know? We have a Wiki!
It has sections such as this Useful Widgets gallery! 👌


Thank you!

Ongoing work on Dear ImGui is currently financially supported by:

Huge thank you to all past and present supporters!

Dear ImGui is funded by your contributions and needs them right now.
If your company uses Dear ImGui, consider reaching out. See Sponsors page for details.

fruits

TL;DR;

  • Renamed the old and inconsistent flexible ListBox helpers to be in line with our typical API.
  • Simplified integration of imgui_freetype.
  • Added GetMainViewport() as a way to access Platform/Host Window information (and later Platform Monitor).
  • Added partial support for colored font glyph in imgui_freetype (courtesy of @pshurgal).
  • Fixed a Tables bug in 1.80 when using multi-components widgets.
  • Experimental WebGPU renderer backend (courtesy of @bfierz).
  • Win32 backends load XInput dynamically (courtesy of [@Demonese])
  • Docking and Viewports fixes.
  • Dozens of other additions and fixes.

Breaking Changes

(Suggestion: once in a while, add #define IMGUI_DISABLE_OBSOLETE_FUNCTIONS in your imconfig.h file to make sure you are not using to-be-obsoleted symbols.)

  • ListBox helpers:
    • Renamed ListBoxHeader(const char* label, ImVec2 size) to BeginListBox().
    • Renamed ListBoxFooter() to EndListBox().
    • Removed ListBoxHeader(const char* label, int items_count, int height_in_items = -1) in favor of specifying size. In the redirection function, made vertical padding consistent regardless of items_count <= height_in_items or not.
    • Kept inline redirection function for all threes (will obsolete).
  • imgui_freetype:
    • We refactored some of imgui_freetype to make integration easier (a simple #define IMGUI_ENABLE_FREETYPE in your config file does the job for most users) and also to fix some inconsistencies. The majority of imgui_freetyoe users shouldn't be affected as the RasterizerFlags were rarely used.
    • Removed ImGuiFreeType::BuildFontAtlas(). Kept inline redirection function.
      Prefer using #define IMGUI_ENABLE_FREETYPE, but there's a runtime selection path available too.
    • The shared extra flags parameters (very rarely used) are now stored in ImFontAtlas::FontBuilderFlags.
    • Renamed ImFontConfig::RasterizerFlags (used by FreeType) to ImFontConfig::FontBuilderFlags.
    • Renamed ImGuiFreeType::XXX flags to ImGuiFreeTypeBuilderFlags_XXX for consistency with other API.

All Changes

  • Tables: Fixed PopItemWidth() or multi-components items not restoring per-colum ItemWidth correctly. (#3760)
  • Viewports Added ImGui::GetMainViewport() as a way to get the bounds and work area of the host display. (#3789, #1542)
    • In master branch or without multi-viewports feature enabled:
      • GetMainViewport()->Pos is always == (0,0)
      • GetMainViewport()->Size is always == io.DisplaySize
    • In docking branch and with the multi-viewports feature enabled:
      • GetMainViewport() will return information from your host Platform Window.
      • In the future, we will support a "no main viewport" mode and this may return bounds of your main monitor.
    • For forward compatibility with multi-viewports/multi-monitors:
      • Code using (0,0) as a way to signify "upper-left of the host window" should use GetMainViewport()->Pos.
      • Code using io.DisplaySize as a way to signify "size of the host window" should use GetMainViewport()->Size.
    • We are also exposing a work area in ImGuiViewport (WorkPos, WorkSize vs Pos, Size for full area):
      • For a Platform Window, the work area is generally the full area minus space used by menu-bars.
      • For a Platform Monitor, the work area is generally the full area minus space used by task-bars.
    • All of this has been the case in 'docking' branch for a long time. What we've done is merely merging
      a small chunk of the multi-viewport logic into 'master' to standardize some concepts ahead of time.
  • Window: Fixed minor title bar text clipping issue when FramePadding is small/zero and there are no close button in the window. (#3731)
  • SliderInt: Fixed click/drag when v_min==v_max from setting the value to zero. (#3774) [@erwincoumans] Would also repro with DragFloat() when using ImGuiSliderFlags_Logarithmic with v_min==v_max.
  • Menus: Fixed an issue with child-menu auto sizing (issue introduced in 1.80 on 2021/01/25) (#3779)
  • InputText: Fixed slightly off ScrollX tracking, noticeable with large values of FramePadding.x. (#3781)
  • InputText: Multiline: Fixed padding/cliprect not precisely matching single-line version. (#3781)
  • InputText: Multiline: Fixed FramePadding.y worth of vertical offset when aiming with mouse.
  • ListBox: Tweaked default height calculation.
  • Fonts: imgui_freetype: Facilitated using FreeType integration: [@Xipiryon, @ocornut]
    • Use #define IMGUI_ENABLE_FREETYPE in imconfig.h should make it work with no other modifications other than compiling misc/freetype/imgui_freetype.cpp and linking with FreeType.
    • Use #define IMGUI_ENABLE_STB_TRUETYPE if you somehow need the stb_truetype rasterizer to be compiled in along with the FreeType one, otherwise it is enabled by default.
  • Fonts: imgui_freetype: Added support for colored glyphs as supported by Freetype 2.10+ (for .ttf using CPAL/COLR
    tables only). Enable the ImGuiFreeTypeBuilderFlags_LoadColor on a given font. Atlas always output directly as RGBA8 in this situation. Likely to make sense with IMGUI_USE_WCHAR32. (#3369) [@pshurgal]
  • Fonts: Fixed CalcTextSize() width rounding so it behaves more like a ceil. This is in order for text wrapping to have enough space when provided width precisely calculated with CalcTextSize().x. (#3776). Note that the rounding of either positions and widths are technically undesirable (e.g. #3437, #791) but variety of code is currently on it so we are first fixing current behavior before we'll eventually change it.
  • Log/Capture: Fix various new line/spacing issue when logging widgets. [@Xipiryon, @ocornut]
  • Log/Capture: Improved the ASCII look of various widgets, making large dumps more easily human readable.
  • ImDrawList: Fixed AddCircle()/AddCircleFilled() with (rad > 0.0f && rad < 1.0f && num_segments == 0). (#3738) Would lead to a buffer read overflow.
  • ImDrawList: Clarified PathArcTo() need for a_min <= a_max with an assert.
  • ImDrawList: Fixed PathArcToFast() handling of a_min > a_max.
  • Metrics: Back-ported "Viewports" debug visualizer from docking branch.
  • Demo: Added Examples->Fullscreen Window demo using GetMainViewport() values. (#3789)
  • Demo: Simple Overlay demo now moves under main menu-bar (if any) using GetMainViewport()'s work area.
  • Backends: Win32: Dynamically loading XInput DLL instead of linking with it, facilitate compiling with old WindowSDK versions or running on Windows 7. (#3646, #3645, #3248, #2716) [@Demonese]
  • Backends: Vulkan: Add support for custom Vulkan function loader and VK_NO_PROTOTYPES. (#3759, #3227) [@Hossein-Noroozpour]. User needs to call ImGui_ImplVulkan_LoadFunctions() with their custom loader prior to other functions.
  • Backends: Metal: Fixed texture storage mode when building on Mac Catalyst. (#3748) [@Belinsky-L-V]
  • Backends: OSX: Fixed mouse position not being reported when mouse buttons other than left one are down. (#3762) [@rokups]
  • Backends: WebGPU: Added enderer backend for WebGPU support (imgui_impl_wgpu.cpp) (#3632) [@bfierz] Please note that WebGPU is currently experimental, will not run on non-beta browsers, and may break.
  • Examples: WebGPU: Added Emscripten+WebGPU example. (#3632) [@bfierz]
  • Backends: GLFW: Added ImGui_ImplGlfw_InitForOther() initialization call to use with non OpenGL API. (#3632)

Other branches & Beta features!

Also see previou release notes such as 1.80.

The docking (#2109) and multi-viewports (#1542) features are available in the docking branch, they are in beta but actively maintained and being used by many teams already. Your continuous feedback is always appreciated.

Some of changes from 1.80 to 1.81 related to the docking branch (multi-viewport and docking features) include:

  • Docking: Fix losing docking information on closed windows for which the hosting node was split. (#3716) [@GamingMinds-DanielC]
  • Docking: Fix gap in hit test hole when using ImGuiDockNodeFlags_PassthruCentralNode touching the edge of a viewport. (#3733)
  • Viewports: (Breaking) removed ImGuiPlatformIO::MainViewport which is now pretty much unused and duplicate (and misleading as we will evolve the concept).
  • Viewports: (Breaking) turned ImGuiViewport::GetWorkPos(), ImGuiViewport::GetWorkSize() into straight fields -> WorkPos, WorkSize before exposing in master branch.
  • Viewports: Fix issue inferring viewport z-order when new popups gets created. (#3734) + Metrics updates.
  • Viewports, Backends: Vulkan: handle VK_ERROR_OUT_OF_DATE_KHR when resizing secondary viewport (#3766, #3758)

There's a CMake pull-request (#1713) if you prefer a traditional CMake integration over registering sources files in your own project. There's a premake5 branch if you prefer the sane Visual Studio projects generated by premake.

Gallery

Below a selection of screenshots from Gallery threads...

@dfranx: ImFileDialog is a file dialog library for Dear ImGui
FileDialog

"Bezel Engine" tooling by Nintendo (from https://www.nintendo.co.jp/jobs/keyword/53.html)
bezel engine

AlphaTerm financial software http://www.alphaticks.io
EsSBnmdXIAA-9Ec

@phkehl: "GNSS receiver configuration and analysis tool (not publicly available at the moment)"
screenshot

Starting the topic with some impressive stuff gathered around:

@felixfaire: "Hey all, I used imgui to make this app with Cinder. (with a bit of styling)"
MW_RR_PentagramBlog_images_new2

@IronicallySerious: "Did some massive UI refactors (aka pickup up other designs online and tweaked the values a bit :p) in our engine"
Rootex Editor

Alyx: "model viewer and live texture editing tool using imgui"
Alyx's model viewer

[High polish warning]
Spotify client (using internal Spotiy API)
Video: https://twitter.com/rogueops/status/1348956562254139392

[High polish warning]
Photon 3D LUT Editor by @PirminStraub and team
#3792
https://www.color.io/photon
Overview_Operate_Spindel
Snapshot Mixer

...Also see last month ImDrawList Party:
particle text


PS: Dear ImGui is funded by your contributions and needs them right now.
If your company uses Dear ImGui, consider reaching out. See Sponsors page for details.

Don't miss a new imgui release

NewReleases is sending notifications on new releases.