v1.77
版本发布时间: 2020-06-29 23:17:28
ocornut/imgui最新发布版本:v1.91.3(2024-10-04 21:48:34)
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!
Homepage: https://github.com/ocornut/imgui Release notes: https://github.com/ocornut/imgui/releases Wiki: https://github.com/ocornut/imgui/wiki for bindings, links, extensions etc. FAQ: https://www.dearimgui.org/faq/ Discord server: https://discord.dearimgui.org Issues and support: https://github.com/ocornut/imgui/issues
Thank you!
Ongoing work on Dear ImGui is currently financially supported by:
- Platinum sponsors: Blizzard, Ubisoft, Nvidia, Google
- Also recently supported by Activision, Arkane Studios, RAD Game Tools, Grinding Gear Games and more. See sponsors page for details.
We are transitioning toward a B2B model to grow and sustain the project (also see: "What happened in 2019?"). If your company uses Dear ImGui, consider reaching out at contact at dearimgui.com.
Huge thank you to all past and present supporters!
Breaking Changes
- Removed
ImFontAtlas::AddCustomRectRegular()
unnecessary first argumentID
. Please note that this is a Beta api and will likely be reworked in order to support multi-DPI across multiple monitor s. - Renamed
OpenPopupOnItemClick()
toOpenPopupContextItem()
. Kept inline redirection function (will obsolete). - Removed
BeginPopupContextWindow(const char*, int mouse_button, bool also_over_items)
in favor ofBeginPopupContextWindow(const char*, ImGuiPopupFlags flags)
withImGuiPopupFlags_NoOverItems
. Kept inline redirection function (will obsolete). - Removed obsoleted
CalcItemRectClosestPoint()
entry point (has been asserting since December 2017).
Other Changes
- TreeNode: Fixed bug where
BeginDragDropSource()
failed when the_OpenOnDoubleClick
flag is enabled (bug introduced in 1.76, but pre-1.76 it would also fail unless the _OpenOnArrow flag was also set, and_OpenOnArrow
is frequently set along with_OpenOnDoubleClick
). - TreeNode: Fixed bug where dragging a payload over a TreeNode() with either
_OpenOnDoubleClick
or_OpenOnArrow
would open the node. (#143) - Windows: Fix unintended feedback loops when resizing windows close to main viewport edges. [@rokups]
- Tabs: Added
style.TabMinWidthForUnselectedCloseButton
settings:- Set to 0.0f (default) to always make a close button appear on hover (same as Chrome, VS).
- Set to FLT_MAX to only display a close button when selected (merely hovering is not enough).
- Set to an intermediary value to toggle behavior based on width (same as Firefox).
- Tabs: Added a
ImGuiTabItemFlags_NoTooltip
flag to disable the tooltip for individual tab item (vsImGuiTabBarFlags_NoTooltip
for entire tab bar). [@Xipiryon] - Popups: All functions capable of opening popups (OpenPopup*, BeginPopupContext*) now take a new
ImGuiPopupFlags
sets of flags instead of a mouse button index. The API is automatically backward compatible as ImGuiPopupFlags is guaranteed to hold mouse button index in the lower bits. - Popups: Added
ImGuiPopupFlags_NoOpenOverExistingPopup
forOpenPopup*
/BeginPopupContext*
functions to first test for the presence of another popup at the same level. - Popups: Added
ImGuiPopupFlags_NoOpenOverItems
forBeginPopupContextWindow()
- similar to testing for!IsAnyItemHovered()
prior to doing anOpenPopup()
. - Popups: Added
ImGuiPopupFlags_AnyPopupId
andImGuiPopupFlags_AnyPopupLevel
flags forIsPopupOpen()
, allowing to check if any popup is open at the current level, if a given popup is open at any popup level, if any popup is open at all. - Popups: Fix an edge case where programmatically closing a popup while clicking on its empty space would attempt to focus it and close other popups. (#2880)
- Popups: Fix
BeginPopupContextVoid()
when clicking over the area made unavailable by a modal. (#1636) - Popups: Clarified some of the comments and function prototypes.
- Modals:
BeginPopupModal()
doesn't set theImGuiWindowFlags_NoSavedSettings
flag anymore, and will not always be auto-centered. Note that modals are more similar to regular windows than they are to popups, so api and behavior may evolve further toward embracing this. (#915, #3091). Enforce centering using e.g. SetNextWindowPos(io.DisplaySize * 0.5f, ImGuiCond_Appearing, ImVec2(0.5f,0.5f)). - Metrics: Added a "Settings" section with some details about persistent ini settings.
- Nav, Menus: Fix vertical wrap-around in menus or popups created with multiple appending calls to
BeginMenu()
/EndMenu()
or BeginPopup()/
EndPopup()`. (#3223, #1207) [@rokups] - Drag and Drop: Fixed unintended fallback "..." tooltip display during drag operation when drag source uses _SourceNoPreviewTooltip flags. (#3160) [@rokups]
- Columns: Lower overhead on column switches and switching to background channel. Benefits Columns but was primarily made with Tables in mind!
- Fonts: Fix
GetGlyphRangesKorean()
end-range to end at 0xD7A3 (instead of 0xD79D). (#348, #3217) [@marukrap] - ImDrawList: Fixed an issue where draw command merging or primitive unreserve while crossing the VtxOffset boundary would lead to draw commands with wrong VtxOffset. (#3129, #3163, #3232, #2591) [@thedmd, @Shironekoben, @sergeyn, @ocornut]
- ImDrawList, ImDrawListSplitter, Columns: Fixed an issue where changing channels with different TextureId, VtxOffset would incorrectly apply new settings to draw channels. (#3129, #3163) [@ocornut, @thedmd, @Shironekoben]
- ImDrawList, ImDrawListSplitter, Columns: Fixed an issue where starting a split when current VtxOffset was not zero would lead to draw commands with wrong VtxOffset. (#2591)
- ImDrawList, ImDrawListSplitter, Columns: Fixed an issue where starting a split right after a callback draw command would incorrectly override the callback draw command.
- ImDrawList: Fixed minor bug introduced in 1.75 where
AddCircle()
with 12 segments would generate an extra unrequired vertex. [@ShironekoBen] - Misc, Freetype: Fix for rare case where
FT_Get_Char_Index()
succeeds butFT_Load_Glyph()
fails. - Docs: Improved and moved font documentation to docs/FONTS.md so it can be readable on the web. Updated various links/wiki accordingly. Added FAQ entry about DPI. (#2861) [@ButternCream, @ocornut]
- CI: Added CI test to verify we're never accidentally dragging libstdc++ (on some compiler setups, static constructors for non-pod data seems to drag in libstdc++ due to thread-safety concerns). Fixed a static constructor which led to this dependency on some compiler setups.
- Backends: Win32: Support for #define NOGDI, won't try to call
GetDeviceCaps()
. (#3137, #2327) - Backends: Win32: Fix _WIN32_WINNT < 0x0600 (MinGW defaults to 0x502 == Windows 2003). (#3183)
- Backends: SDL: Report a zero display-size when window is minimized, consistent with other back-ends, making more render/clipping code use an early out path.
- Backends: OpenGL: Fixed handling of GL 4.5+
glClipControl(GL_UPPER_LEFT)
by inverting the projection matrix top and bottom values. (#3143, #3146) [@u3shit] - Backends: OpenGL: On OSX, if unspecified by app, made default GLSL version 150. (#3199) [@albertvaka]
- Backends: OpenGL: Fixed loader auto-detection to not interfere with ES2/ES3 defines. (#3246) [@funchal]
- Backends: Vulkan: Fixed error in if initial frame has no vertices. (#3177)
- Backends: Vulkan: Fixed edge case where render callbacks wouldn't be called if the ImDrawData structure didn't have any vertices. (#2697) [@kudaba]
- Backends: OSX: Added workaround to avoid fast mouse clicks. (#3261, #1992, #2525) [@nburrus]
- Examples: GLFW+Vulkan, SDL+Vulkan: Fix for handling of minimized windows. (#3259)
- Examples: Apple: Fixed example_apple_metal and example_apple_opengl2 using imgui_impl_osx.mm not forwarding right and center mouse clicks. (#3260) [@nburrus]
Other branches & Beta features!
The tables (#2957) features is still available for testing. When it stabilize we will merge it to master (expected to be part of 1.80).
Some user-visible changes from 1.76 in 1.77 related to the tables branch include:
- Tables: Restore width/weight saving/loading code. Non-weighted width are font/DPI change friendly.
- Tables: Resizing weighted column preserve sum of weights. Fix ResizedColumn init leading to undesirable TableSetColumnWidth() on first run.
- Tables: Added
TableGetHoveredColumn()
, simplifyingTableAutoHeaders()
toward aim of it being a user-land function. - Tables: Made
TableHeader()
responsible for opening per-column context menu to move responsibility away fromTableAutoHeaders()
. - Tables: Fix
TableDrawMergeChannels()
mistakenly merging unfrozen columns ClipRect with host ClipRect. - Tables: Fix assert/crash when a visible column is clipped in a multi clip group situation.
- Tables: Fix sort specs sometimes incorrectly reporting sort spec count when table loses _MultiSortable flag during runtime.
- Tables: Fixed a manual resize path not marking settings as dirty,
TableSortSpecsSanitize()
doesn't need to test table->IsInitializing - Tables: Try to report contents width to outer window, generally better auto-fit.
- Tables: Fixed incorrect application of CursorMaxPos.x. (#3162)
- Tables: Fixed ignoring DefaultHide or DefaultSort data from flags when loading settings that don't have them.
- Tables: Not flagging whole column as SkipItems based on clipping visibility (would break layout).
- Tables: Allow hot-reload of settings (merge policy), tidying up settings code.
- Tables: Browse settings list in Metrics->Settings.
- Tables: Demo: Custom per-popup popups, demonstrate
TableGetHoveredColumn()
and `ImGuiPopupFlags_NoOpenOverExistingPopup. - Tables: Added plenty of regression tests in imgui_dev private repository.
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.76 in 1.77 related to the docking branch (multi-viewport and docking features) include:
- Viewports: Don't set
ImGuiViewportFlags_NoRendererClear
whenImGuiWindowFlags_NoBackground
is set. (#3213) - Viewports: Report minimized viewports as zero DisplaySize to be consistent with main branch + comments (#1542)
- Docking, Settings: Allow reload of settings data at runtime. (#2573)
- Backends, GLFW: Fix windows resizing incorrectly on Linux due to GLFW firing window positioning callbacks on next frame after window is resized manually. (#2117)
- Backends: DX12: Fix OBJECT_DELETED_WHILE_STILL_IN_USE on viewport resizing. (#3210)
- Backends: DX12: Fix for crash caused by early resource release. (#3121)
- Backends, Win32: Request monitor update when dpi awarness is enabled to make sure they have the correct dpi settings.
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 saner and nicer Visual Studio projects generated by premake.
Help wanted!
- If your company uses Dear ImGui, you can reach out to contact at dearimgui.com.
- 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!.
- 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)
- Browsing issues and todo list you may find something something to contribute to!
Gallery
Impressive showcase in the Gallery for this release! See Gallery threads for more pictures and to post yours!
VX2 by Spectrals http://www.pouet.net/prod.php?which=85304 (won 1st place PC Demo at Revision 2020) https://twitter.com/Speedoog/status/1249776515316944897 "Here's some screenshots of our edition tool with lots of dear imgui windows :) You can see the sequencer, keyframable property editor, curves, math expressions, effect tester, debug etc ... Sequencer is based on a fork of ImSequencer by @skaven_ Thanks to you too "
(VR) Desktop+ https://github.com/elvissteinjr/DesktopPlus A desktop mirroring overlay application for SteamVR
(VR) BIMXplorer https://www.bimxplorer.com
A new version of tooll.io written in ImGui / ImGui.net.
osp https://github.com/notnotme/osp This is a chiptune player I do for the nintendo switch
python-concour https://github.com/potocpav/python-concur "I made a UI library on top of ImGui in Python, geared towards scientific visualization & image processing. I have been using it at our company for quick, even throw-away GUIs, but also for more complex applications lately."
nesEmu https://github.com/Redcrafter/nesEmu @Redcrafter: "I'm using ImGui for my nes emulator"
ImPlot https://github.com/epezent/implot Some recent additions:
Queries:
Pie Charts:
Heat Maps:
@jrdmellow: Simple input debugging overlay with some custom rendering for input axes. Simple input debugging overlay with some custom rendering for input axes.
NetImGui https://github.com/sammyfreg/netImgui by @Sammyfreg: "NetImgui is a library to remotely display and control Dear ImGui menus with an associated netImgui server application. Designed to painlessly integrate into existing codebase with few changes required to the existing logic. Initially created to assist game developers in debugging their game from a PC while it runs on console. However, its use can easily be extended to other fields."