v1.73
版本发布时间: 2019-09-24 23:18:11
ocornut/imgui最新发布版本:v1.91.3(2024-10-04 21:48:34)
Fall celebration release! This is a general release, keeping with the rhythm of having more frequent, smaller releases.
Reading the full changelog is a good way to keep up to date with the things dear imgui has to offer, and maybe will give you ideas of some features that you've been ignoring until now!
See https://github.com/ocornut/imgui for the project homepage. See https://github.com/ocornut/imgui/releases for earlier release notes. See https://github.com/ocornut/imgui/wiki for bindings, links, 3rd parties helpers/extensions, widgets etc. Issues and support: https://github.com/ocornut/imgui/issues Technical support for new users: https://discourse.dearimgui.org (also search in GitHub Issues)
Thank you!
Ongoing work on dear imgui is currently being sponsored by Blizzard Entertainment and Google (welcome Google!) + general & community work by many individual users, hobbyists and studios. See the readme for details. Huge thank you to all of you, past and present supporters! You help is very meaningful.
A lot of my time recently has been working on way to scale the team and increase velocity of Dear ImGui development. This is translating into contributions from more developers already visible in this version (with more to come!). Upcoming sponsors and donations will help fund an increasing amount of other developers.
Dear ImGui is looking for a technical writer to help writing technical articles, tutorials and documentation. Please reach out if you are interesting in helping! (omarcornut at gmail)
TL;DR;
- Nav: Home/End key support (was missing!).
- Tabs/TabBar fixes.
- ColorEdit workaround against HSV discontinuities when storing data as RGB.
- DragScalar: fixes for dragging unsigned values on ARM cpus.
- Tree: added flags to span available horizontal space or cover indentation area.
- Font: improve drawing of ellipsis ("...") which we will start to make more use of.
- Misc: release unused pools of vertex memory when windows become unused for a while.
- Dozens of other fixes, tweaks and improvements.
Other Changes:
- Nav, Scrolling: Added support for Home/End key. (#787)
- ColorEdit: Disable Hue edit when Saturation==0 instead of letting Hue values jump around.
- ColorEdit, ColorPicker: In HSV display of a RGB stored value, attempt to locally preserve Hue when Saturation==0, which reduces accidentally lossy interactions. (#2722, #2770) [@rokups]
- ColorPicker: Made rendering aware of global style alpha of the picker can be faded out. (#2711). Note that some elements won't accurately fade down with the same intensity, and the color wheel when enabled will have small overlap glitches with (style.Alpha < 1.0).
- TabBar: Fixed single-tab not shrinking their width down.
- TabBar: Fixed clicking on a tab larger than tab-bar width creating a bouncing feedback loop.
- TabBar: Feed desired width (sum of unclipped tabs width) into layout system to allow for auto-resize. (#2768) (before 1.71 tab bars fed the sum of current width which created feedback loops in certain situations).
- TabBar: Improved shrinking for large number of tabs to avoid leaving extraneous space on the right side. Individuals tabs are given integer-rounded width and remainder is spread between tabs left-to-right.
- Columns, Separator: Fixed a bug where non-visible separators within columns would alter the next row position differently than visible ones.
- SliderScalar: Improved assert when using U32 or U64 types with a large v_max value. (#2765) [@loicmouton]
- DragInt, DragFloat, DragScalar: Using (v_min > v_max) allows locking any edits to the value.
- DragScalar: Fixed dragging of unsigned values on ARM cpu (float to uint cast is undefined). (#2780) [@dBagrat]
- TreeNode: Added
ImGuiTreeNodeFlags_SpanAvailWidth flag
. This extends the hit-box to the right-most edge, even if the node is not framed. (Note: this is not the default in order to allow adding other items on the same line. In the future we will aim toward refactoring the hit-system to be front-to-back, allowing more natural overlapping of items, and then we will be able to make this the default.) . (#2451, #2438, #1897) [@Melix19, @PathogenDavid] - TreeNode: Added
ImGuiTreeNodeFlags_SpanFullWidth
flag. This extends the hit-box to both the left-most and right-most edge of the working area, bypassing indentation. - CollapsingHeader: Added support for
ImGuiTreeNodeFlags_Bullet
andImGuiTreeNodeFlags_Leaf
on framed nodes, mostly for consistency. (#2159, #2160) [@goran-w] - Selectable: Added
ImGuiSelectableFlags_AllowItemOverlap
flag in public api (was previously internal only). - Style: Allow
style.WindowMenuButtonPosition
to be set toImGuiDir_None
to hide the collapse button. (#2634, #2639) - Font: Better ellipsis ("...") drawing implementation. Instead of drawing three pixel-ey dots (which was glaringly unfitting with many types of fonts) we first attempt to find a standard ellipsis glyphs within the loaded set. Otherwise we render ellipsis using '.' from the font from where we trim excessive spacing to make it as narrow as possible. (#2775) [@rokups]
- ImDrawList: Clarified the name of many parameters so reading the code is a little easier. (#2740)
- ImDrawListSplitter: Fixed merging channels if the last submitted draw command used a different texture. (#2506)
- Using offsetof() when available in C++11. Avoids Clang sanitizer complaining about old-style macros. (#94)
- ImVector: Added
find()
,find_erase()
,find_erase_unsorted()
helpers. - Added a mechanism to compact/free the larger allocations of unused windows (buffers are compacted when a window is unused for 60 seconds, as per
io.ConfigWindowsMemoryCompactTimer = 60.0f
). Note that memory usage has never been reported as a problem, so this is merely a touch of overzealous luxury. (#2636) - Documentation: Various tweaks and improvements to the README page. [@ker0chan]
- Backends: OpenGL3: Tweaked initialization code allow application calling
ImGui_ImplOpenGL3_CreateFontsTexture()
beforeImGui_ImplOpenGL3_NewFrame()
, which sometimes can be convenient. - Backends: OpenGL3: Attempt to automatically detect default GL loader by using
__has_include
. (#2798) [@o-micron] - Backends: DX11: Fixed
GSGetShader()
call not passing an initialized instance count, which would generally make the DX11 debug layer complain (bug added in 1.72). - Backends: Vulkan: Added support for specifying multisample count. Set
ImGui_ImplVulkan_InitInfo::MSAASamples
to one of theVkSampleCountFlagBits
values to use, default is non-multisampled as before. (#2705, #2706) [@vilya] - Examples: OSX: Fix example_apple_opengl2/main.mm not forwarding mouse clicks and drags correctly. (#1961, #2710) [@intonarumori, @ElectricMagic]
- Misc: Updated
stb_rect_pack.h
from 0.99 to 1.00 (fixes by @rygorous: off-by-1 bug in best-fit heuristic, fix handling of rectangles too large to fit inside texture). (#2762) [@tido64]
Beta features!
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. Recent changes to the multi-viewport and docking features:
- Docking: Fix BeginDocked() path that creates node so that
SetNextWindowDockID()
doesn't immediately discard the node. (#2109) - Docking: Fix for node created at the same time as windows that are still resizing (typically with
io.ConfigDockingAlwaysTabBar
) to not be zero/min sized. (#2109). The fix delays their visibility by one frame, which is not ideal but not very problematic as the .ini data gets populated after that. - Docking: Fix a crash that could occur with a malformed ini file (DockNode Parent value pointing to a missing node).
- Viewport: Fix modal/popup window being stuck in unowned hidden viewport associated to fallback window without stealing it back. Fix modal reference viewport when opened outside of another window. (#1542)
- Viewport: Modals don't need to set
ImGuiViewportFlags_NoFocusOnClick
, this also mitigate the issue described by #2445, which becomes particularly bad with unfocused modal. (#1542) - Viewport: better case case where host window gets moved and resized simultaneous (toggling maximized state). There's no perfect solution there, than using
io.ConfigViewportsNoAutoMerge = false
. (#1542) - Viewport, Docking: Fixed incorrect assignment of IsFallbackWindow which would tag dock node host windows created in NewFrame() as such, messing with popup viewport inheritance.
- Viewport: Fixed issue where resize grip would display as hovered while mouse is still off the OS bounds so click would miss it and focus the OS window behind expected one. (#1542)
- Viewport: Fix to allow multiple shutdown / calls to
DestroyPlatformWindows()
. (#2769) - Viewport: Backends: GLFW: Fix setting window size on macOS (#2767, #2117) [@rokups]
- Viewport: Backends: GLFW+Linux: Fix window having incorrect size after uncollapse. (#2756, #2117) [@rokups]
- Viewport: Backends: DirectX9: Workaround for windows not refreshing when main viewport has no draw call. (#2560)
There's a CMake pull-request (#1713) if you prefer a traditional CMake integration over registering imgui sources files in your own project. There's a premake5 branch if you prefer the nicer Visual Studio projects generated by premake.
Help wanted!
- Dear ImGui is looking for a technical writer to help writing technical articles, tutorials and documentation. Please reach out if you are interesting in helping!.
- One upcoming project will be to start writing a high quality "sample" game editor application to showcase how a fancy polished dear imgui application may look like (vs the standard demo which is constrained by nature of being embedded within the library).
- Multi-viewports in particular needs help and bug-fixes on Linux and Mac. Specific workarounds for both SDL and GLFW are becoming highly desirable. I am myself not a Linux nor Mac users and those platforms have been lagging behind in term of multi-viewport supports. (#2117).
- The Vulkan renderer appears to have issues (see vulkan tag)
- The DirectX12 renderer needs multi-viewports support.
- Browsing issues and todo list you may find something something to contribute to!
Gallery
See Gallery threads for more pictures and to post yours!
"An industrial application for inspecting water pipes using an ultrasonic scanner" by @soulthreads Also see https://github.com/soulthreads/imgui-plot widget.
"Writing a Minecraft seed preview / NBT editor / possibly world editor" by @mnurzia
Micro Profiler from https://github.com/ConfettiFX/The-Forge by @zeux based on @jonasmr's microprofile