v1.49
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/ )
Scroll down for more user screenshots or see the screenshot threads (#539)
Breaking Changes
- Renamed
SetNextTreeNodeOpened()
toSetNextTreeNodeOpen()
for consistency, no redirection. - Removed confusing set of
GetInternalState()
,GetInternalStateSize()
,SetInternalState()
functions. Now usingCreateContext()
,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 withCollapsingHeader(label, ImGuiTreeNodeFlags_DefaultOpen)
. - Changed
ImDrawList::PushClipRect(ImVec4 rect)
toImDraw::PushClipRect(Imvec2 min,ImVec2 max,bool intersect_with_current_clip_rect=false)
. Note that higher-levelImGui::PushClipRect()
is preferable because it will clip at logic/widget level, whereasImDrawList::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 )