Skip to content

Releases: ocornut/imgui

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)

v1.43

17 Jul 12:58
Compare
Choose a tag to compare

The anti-aliasing release!

This is a rather important release and we unfortunately had to break the rendering API. ImGui now requires you to render indexed vertices instead of non-indexed ones. The fix should be very easy. Sorry for that! This change is saving a fair amount of CPU/GPU and enables us to get anti-aliasing for a marginal cost.

Each ImDrawList now contains both a vertex buffer and an index buffer. For each command, render ElemCount/3 triangles using indices from the index buffer.

If you are using a vanilla copy of one of the imgui_impl_XXXX.cpp provided in the example, you just need to update your copy and you can ignore the rest.

The signature of the io.RenderDrawListsFn handler has changed:

ImGui_XXXX_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_count)

became:

ImGui_XXXX_RenderDrawLists(ImDrawData* draw_data)

Where

argument   'cmd_lists'        -> 'draw_data->CmdLists'
argument   'cmd_lists_count'  -> 'draw_data->CmdListsCount'
ImDrawList 'commands'         -> 'CmdBuffer'
ImDrawList 'vtx_buffer'       -> 'VtxBuffer'
ImDrawList  n/a               -> 'IdxBuffer' (new)
ImDrawCmd  'vtx_count'        -> 'ElemCount'
ImDrawCmd  'clip_rect'        -> 'ClipRect'
ImDrawCmd  'user_callback'    -> 'UserCallback'
ImDrawCmd  'texture_id'       -> 'TextureId'

If you REALLY cannot render indexed primitives, you can call the draw_data->DeIndexAllBuffers() method to de-index the buffers. This is slow and a waste of CPU/GPU. Prefer using indexed rendering!
Refer to code in the examples/ folder or ask on the GitHub if you are unsure of how to upgrade. Please upgrade!


  • Added anti-aliasing on lines and shapes based on primitives by @MikkoMononen (#133).
    Between the use of indexed-rendering and the fact that the entire rendering codebase has been optimised and massaged enough, with anti-aliasing enabled ImGui 1.43 is now running FASTER than 1.41.
    Put some extra effort in making the code run faster in your typical Debug build.
  • Anti-aliasing can be disabled in the ImGuiStyle structure via the AntiAliasedLines/AntiAliasedShapes fields for further gains.
  • ImDrawList: Added AddPolyline(), AddConvexPolyFilled() with optional anti-aliasing.
  • ImDrawList: Added stateful path building and stroking API. PathLineTo(), PathArcTo(), PathRect(), PathFill(), PathStroke() with optional anti-aliasing.
  • ImDrawList: Added AddRectFilledMultiColor() helper.
  • ImDrawList: Added multi-channel rendering so out of order elements can be rendered in separate channels and then merged back together (used by columns).
  • ImDrawList: Fixed merging draw commands when equal clip rectangles are in the two first commands.
  • ImDrawList: Fixed window draw lists not destructed properly on Shutdown().
  • ImDrawData: Added DeIndexAllBuffers() helper.
  • Added lots of new font options ImFontAtlas::AddFont() and the new ImFontConfig structure.
    • Added support for oversampling (ImFontConfig: OversampleH, OversampleV) and sub-pixel positioning (ImFontConfig: PixelSnapH).
      Oversampling allows sub-pixel positioing but can also be used as a way to get some leeway with scaling fonts without re-rasterizing.
    • Added GlyphExtraSpacing option to add extra horizontal spacing between characters (#242).
    • Added MergeMode option to merge glyphs from different font inputs into a same font (#182, #232).
    • Added FontDataOwnedByAtlas option to keep ownership from the TTF data buffer and request the atlas to make a copy (#220).
  • Updated to stb_truetype 1.06 (+ minor mods) with better font rasterization.
  • InputText: Added ImGuiInputTextFlags_NoHorizontalScroll flag.
  • InputText: Added ImGuiInputTextFlags_AlwaysInsertMode flag.
  • InputText: Added HasSelection() helper in ImGuiTextEditCallbackData as a clarification.
  • InputText: Fix for using END key on a multi-line text editor (#275)
  • Columns: Dispatch render of each column in a sub-draw list and merge on closure, saving a lot of draw calls! (#125)
  • Popups: Fixed Combo boxes inside menus. (#272)
  • Style: Added GrabRounding setting to make the sliders etc. grabs rounded.
  • Changed SameLine() parameters from int to float.
  • Fixed incorrect assert triggering when code stole ActiveID from user moving a window by calling e.g. SetKeyboardFocusHere().
  • Fixed CollapsingHeader() label rendering outside its frame in columns context where cliprect max isn't aligned with the right-side of the header.
  • Metrics window: calculate bounding box of actual vertices when hovering a draw list.
  • Examples: Showing more information in the Fonts section.
  • Examples: Added a gratuitous About window.
  • Examples: Updated all examples code (OpenGL/DX9/DX11/SDL/Allegro/iOS) to use indexed rendering.
  • Examples: Fixed the SDL2 example to support Unicode text input (#274).

examples_04

test_window_02

skinning_sample_02

v1.42

08 Jul 19:08
Compare
Choose a tag to compare
  • Renamed SetScrollPosHere() to SetScrollHere(). Kept inline redirection function (will obsolete). Renamed GetScrollPosY() to GetScrollY(). Necessary to reduce confusion and make scrolling API consistent, because positions (e.g. cursor position) are not equivalent to scrolling amount.
  • Added SDL2 example application (courtesy of @CedricGuillemet)
  • Added iOS example application (courtesy of @joeld42)
  • Added Allegro 5 example application (courtesy of @bggd)
  • Added TitleBgActive color in style so focused window is made visible. (#253)
  • Added CaptureKeyboardFromApp() / CaptureMouseFromApp() to manually enforce inputs capturing.
  • Added DragFloatRange2() DragIntRange2() helpers. (#76)
  • Added a Y centering ratio to SetScrollFromCursorPos() which can be used to aim the top or bottom of the window. (#150)
  • Added SetScrollY(), SetScrollFromPos(), GetCursorStartPos() for manual scrolling manipulations. (#150).
  • Added GetKeyIndex() helper for converting from ImGuiKey_* enum to user's keycodes. Basically pulls from io.KeysMap[].
  • Added missing ImGuiKey_PageUp, ImGuiKey_PageDown so more UI code can be written without referring to implementation-side keycodes.
  • MenuItem() can be activated on release. (#245)
  • Allowing NewFrame() with DeltaTime==0.0f to not assert.
  • Fixed IsMouseDragging(). (#260)
  • Fixed PlotLines(), PlotHistogram() using incorrect hovering test so they would show their tooltip even when there is a popup between mouse and the graph.
  • Fixed window padding being reported incorrectly for child windows with borders when parent have no borders.
  • Fixed a bug with TextUnformatted() clipping of long text blob when clipping y1 line sits on the first line of text. (#257)
  • Fixed text baseline alignment of small button (no padding) after regular buttons.
  • Fixed ListBoxHeader() not honoring negative sizes the same way as BeginChild() or BeginChildFrame(). (#263)
  • Fixed warnings for more pedantic compiler settings (#258).
  • ImVector<> cannot be re-defined anymore, cannot be replaced with std::vector<>. Allowed us to clean up and optimise lots of code. Yeah! (#262)
  • ImDrawList: store pointer to their owner name for easier auditing/debugging.
  • Examples: added scroll tracking example with SetScrollFromCursorPos().
  • Examples: metrics windows render clip rectangle when hovering over a draw call.
  • Lots of small optimisation (particularly to run faster on unoptimised builds) and tidying up.
  • Added font links in extra_fonts/ + instructions for using compressed fonts in C array.
  • Removed obsolete GetDefaultFontData() function that would assert anyway. If you are updating from <1.30 you'll get a compile error instead of an assertion. (obsoleted 2015/01/11)

drag range b

scroll b

v1.41

26 Jun 04:04
Compare
Choose a tag to compare
  • Breaking change: changed ImageButton() default bg_col parameter from (0,0,0,1) (black) to (0,0,0,0) (transparent) - only makes a difference when texture have transparence.
  • Breaking change: changed Selectable() API from (label, selected, size) to (label, selected, flags, size). Size override should be used very rarely so hopefully it doesn't affect many people. Sorry!
  • Added InputTextMultiline() multi-line text editor, vertical scrolling, selection, optimized enough to handle rather big chunks of text in stateless context (thousands of lines are ok), option for allowing Tab to be input, option for validating with Return or Ctrl+Return (#200).
  • Added modal window API, BeginPopupModal(), follows the popup api scheme. Modal windows can be closed by clicking outside. By default the rest of the screen is dimmed (using ImGuiCol_ModalWindowDarkening). Modal windows can be stacked.
  • Added GetGlyphRangesCyrillic() helper (#237).
  • Added SetNextWindowPosCenter() to center a window prior to knowing its size. (#249)
  • Added IsWindowHovered() helper.
  • Added IsMouseReleased(), IsKeyReleased() helpers to allow to user to avoid tracking them. (#248)
  • Allow Set*WindowSize() calls to be used with popups.
  • Window: AutoFit can be triggered on each axis separately via SetNextWindowSize(), etc.
  • Window: fixed scrolling with mouse wheel while window was collapsed.
  • Window: fixed mouse wheel scroll issues.
  • DragFloat(), SliderFloat(): Fixed rounding of negative numbers which sometime made the negative lower bound unreachable.
  • InputText(): lifted character count limit.
  • InputText(): fixes in case of using per-window font scaling.
  • Selectable(), MenuItem(): do not use frame rounding for hovering/selection.
  • Selectable(): Added flag ImGuiSelectableFlags_DontClosePopups.
  • Selectable(): Added flag ImGuiSelectableFlags_SpanAllColumns (#125).
  • Combo(): Fixed issue with activating a Combo() not taking active id (#241).
  • ColorButton(), ColorEdit4(): fix to ensure that the colored square stays square when non-default padding settings are used.
  • BeginChildFrame(): returns bool like BeginChild() for clipping.
  • SetScrollPosHere(): takes account of item height + more accurate centering + fixed precision issue.
  • ImFont: ignoring '\r'.
  • ImFont: added GetCharAdvance() helper. Exposed font Ascent and font Descent.
  • ImFont: additional rendering optimizations.
  • Metrics windows display storage size.

modal dialog

multiline_2 - small

selectable span all columns

Bonus screenshot: pimping your ImGui by @Pagghiu

03ddb9dc-19a1-11e5-94b6-e60e5299398e

v1.40

31 May 19:49
Compare
Choose a tag to compare

Short version: added stacked popups, menus, menu bars, menu items + a handful of other features and fixes.
Long version below the images.

NB: The BeginPopup() API (introduced in 1.37) had to be changed to allow for stacked popups and menus. Use OpenPopup() to toggle the opened state and BeginPopup() to append.

_NB: The third parameter of Button(), 'repeat_if_held' has been removed. While it's been very rarely used, some code will possibly break if you didn't rely on the default parameter. Use PushButtonRepeat()/PopButtonRepeat() to configure repeat._

menus shot 0

menus shot 2

examples_03

Bonus unrelated screenshot

drawdb

  • Menus: Added a menu system! Menus are typically populated with menu items and sub-menus, but you can add any sort of widgets in them (buttons, text inputs, sliders, etc.). (#126)
  • Menus: Added MenuItem() to append a menu item. Optional shortcut display, acts a button & toggle with checked/unchecked state, disabled mode. Menu items can be used in any window.
  • Menus: Added BeginMenu() to append a sub-menu. Note that you generally want to add sub-menu inside a popup or a menu-bar. They will work inside a normal window but it will be a bit unusual.
  • Menus: Added BeginMenuBar() to append to window menu-bar (set ImGuiWindowFlags_MenuBar to enable).
  • Menus: Added BeginMainMenuBar() helper to append to a fullscreen main menu-bar.
  • Popups: Support for stacked popups. Each popup level inhibit inputs to lower levels. The menus system is based on this. (#126).
  • Popups: Added BeginPopupContextItem(), BeginPopupContextWindow(), BeginPopupContextVoid() to create a popup window on mouse-click.
  • Popups: Popups have borders by default (#197), attenuated border alpha in default theme.
  • Popups & Tooltip: Fit within display. Handling various positioning/sizing/scrolling edge cases. Better hysteresis when moving in corners. Tooltip always tries to stay away from mouse-cursor.
  • Added ImGuiStorage::GetVoidPtrRef() for manipulating stored void*.
  • Added IsKeyDown() IsMouseDown() as convenience and for consistency with existing functions (instead of reading them from IO structures).
  • Added Dummy() helper to advance layout by a given size. Unlike InvisibleButton() this doen't catch any click.
  • Added configurable io.KeyRepeatDelay, io.KeyRepeatRate keyboard and mouse repeat rate.
  • Added PushButtonRepeat() / PopButtonRepeat() to enable hold-button-to-repeat press on any button. Removed the third 'repeat' parameter of Button().
  • Added IsAnyItemHovered() helper.
  • Added GetItemsLineHeightWithSpacing() helper.
  • Added ImGuiListClipper helper for clipping large list of evenly sized items, to avoid using CalcListClipping() directly.
  • Renamed IsRectClipped() to !IsRectVisible() for consistency (opposite return value!). Kept inline redirection function (will obsolete)
  • Renamed GetWindowCollapsed() to IsWindowCollapsed() for consistency. Kept inline indirection function (will obsolete).
  • Separator: within group start on group horizontal offset. (#205)
  • InputText: Fixed incorrect edit state after text buffer is appended to by user via the callback. (#206)
  • InputText: CTRL+letter-key shortcuts (e.g. CTRL+C/V/X) makes sure only CTRL is pressed. (#214)
  • InputText: Fixed cursor generating a zero-width wireframe rectangle turning into a division by zero (would go unnoticed unless you trapped exceptions).
  • InputFloatN/InputIntN: Flags parameter added to match scalar versions. (#218)
  • Selectable: Horizontal filling not declared to ItemSize() so Selectable(),SameLine() works and we can better auto-fit the window.
  • Selectable: Handling text baseline alignment for line that aren't of text height.
  • Combo: Empty label doesn't add ItemInnerSpacing alignment, matching other widgets.
  • EndGroup: Carries the text base offset from the last line of the group (sort of incorrect but better than nothing, should use the first line of the group, will implement in the future).
  • Columns: distinguish columns-set ID from other widgets as a convenience, added asserts and sailors.
  • Listbox: ListBox() function only use public API to encourage creating custom versions. ListBoxHeader() can return false.
  • Listbox: Uses ImGuiListClipper and assume items of matching height, so large lists can be handled.
  • Plot: overlay label clipped within frame when not fitting.
  • Window: Added ImGuiSetCond_Appearing to test the hidden->visible transition in SetWindow***/SetNextWindow*** functions.
  • Window: Autofitting cancel out one worth of vertical spacing for vertical symmetry (like what group and tooltip do).
  • Window: Default item width for auto-resizing windows expressed as a factor of font height, scales better with different font.
  • Window: Fixed auto-fit calculation mismatch of whether a scrollbar will be added by maximum height clamping. Also honor NoScrollBar in the case of height clamping, not adding extra horizontal space.
  • Window: Hovering require to hover same child window. Reverted 860cf57 (December 3). Might break something if you have childs overlapping items in parent window.
  • Window: Fixed appending multiple times to an existing child via multiple BeginChild/EndChild calls to same child name. Allows a simple form of out-of-order appending.
  • Window: Fixed auto-filling child window using WindowMinSize at their minimum size, irrelevant.
  • Metrics: Added io.MetricsActiveWindows counter. (#213.
  • Metrics: Added io.MetricsAllocs counter (number of active memory allocations).
  • Metrics: ShowMetricsWindow() shows popups stack, allocations.
  • Style: Added style.DisplayWindowPadding to prevent windows from reaching edges of display (similar to style.DisplaySafeAreaPadding which is still in effect and also affect popups/tooltips).
  • Style: Removed style.AutoFitPadding, using style.WindowPadding makes more sense (the default values were already the same).
  • Style: Added style.ScrollbarRounding. (#212)
  • Style: Added ImGuiCol_TextDisabled for disabled text. Added TextDisabled() helper.
  • Style: Added style.WindowTitleAlign alignment options, to e.g. center title on windows. (#222)
  • ImVector: tweak growth strategy, matches vector from VS2010.
  • ImFontAtlas: Added ClearFonts(), making the different clear funcs more explicit. (#224)
  • ImFontAtlas: Fixed appending new fonts without clearing existing fonts. Clearing input data left to application. (#224)
  • ImDrawList: Merge draw command better, cases of multiple Begin/End gets merged properly.
  • Store common stacked settings contiguously in memory to avoid heap allocation for unused features, and reduce cache misses.
  • Shutdown() tests for g.IO.Fonts not being NULL to ease use of multiple ImGui contexts. (#207)
  • Added IMGUI_DISABLE_OBSOLETE_FUNCTIONS define to disable the functions that are meant to be removed.
  • Examples: Added ? marks with tooltips next to various widgets. Added more comments in the demo window.
  • Examples: Added Menu-bar example.
  • Examples: Added Simple Layout example.
  • Examples: AutoResize demo doesn't use TextWrapped().
  • Examples: Console example uses standard malloc/free, makes more sense as a copy & pastable example.
  • Examples: DirectX9/11: Fixed key mapping for down arrow.
  • Examples: DirectX9/11: hide os curosr if ImGui is drawing it. (#155)
  • Examples: DirectX11: explicitly set rasterizer state.
  • Examples: OpenGL3: Add conditional compilation of forward compat as required by glfw on OSX. (#229)
  • Fixed build with Visual Studio 2008 (possibly earlier versions as well).
  • Other fixes, comments, tweaks.

v1.38

19 Apr 22:58
Compare
Choose a tag to compare
  • Added DragFloat(), DragInt() widget, click and drag to adjust value with given step. Hold SHIFT/ALT to speed-up/slow-down. Double-click or CTRL+click to input text. Passing min >= max makes the widget unbounded.
  • Added DragFloat2(), DragFloat3(), DragFloat4(), DragInt2(), DragInt3(), DragInt4() helper variants.
  • Added ShowMetricsWindow() which is mainly useful to debug ImGui internals. Added IO.MetricsRenderVertices counter.
  • Added ResetMouseDragDelta() for iterative dragging operations.
  • Added ImFontAtlas::AddFontFromCompressedTTF() helper + binary_to_compressed_c.cpp tool to compress a file and create a .c array from it.
  • Added PushId() GetId() variants that takes string range to avoid user making unnecessary copies.
  • Added IsItemVisible().
  • Renamed IsClipped() to IsRectClipped(). Kept inline redirection function (will obsolete).
  • Renamed ImDrawList::AddArc() to ImDrawList::AddArcFast().
  • Fixed IsRectClipped() incorrectly returning false when log is enabled.
  • Slider: visual fix in the unlikely that style.GrabMinSize is larger than a slider.
  • SliderFloat: removed support for unbound slider (using FLT_MAX), caused various inconsistency. Use InputFloat()/DragFloat().
  • ColorEdit4: hide components prefix if there's no space for them.
  • Combo: adding frame padding inside the combo box.
  • Columns: mouse dragging uses absolute mouse coordinates.Fixed dragging left-most column of an auto-resizable window. #125
  • Selectable: render highlight into AutoFitPadding region but do not extend it, fixing visual gap.
  • Focus: Allow SetWindowFocus(NULL) to remove focus.
  • Focus: Clicking on void (outside an ImGui windows) loses keyboard-focus so application can use TAB.
  • Popup: Fixed hovering over a popup's child (popups disable hovering on other windows but not their childs) #197
  • Fixed active widget not releasing its active state while being clipped.
  • Fixed user-facing version of IsItemHovered() ignoring overlapping windows.
  • Fixed label vertical alignment for InputInt2(), InputInt3(), InputInt4().
  • Fixed new collapsed auto-resizing window with saved .ini settings not calculating their initial width #176
  • Fixed Begin() returning true on collapsed windows that had loaded settings #176
  • Fixed style.DisplaySafeAreaPadding handling from being applied on window prior to them auto-fitting.
  • ShowTestWindow(): added examples for DragFloat, DragInt and only custom label embedded in format strings.
  • ShowTestWindow(): fixed "manipulating titles" example not doing the right thing, broken in ff35d24
  • Examples: OpenGL/GLFW: Fixed modifier key state setting in GLFW callbacks.
  • Examples: OpenGL/GLFW: Added glBindTexture(0) in OpenGL fixed pipeline examples. Save restore current program and texture in the OpenGL3 example.
  • Examples: DirectX11: Removed unnecessary vertices conversion and CUSTOMVERTEX types.
  • Comments, fixes, tweaks.

dragfloat

dragfloat2

metrics

v1.37

26 Mar 21:33
Compare
Choose a tag to compare
  • Added a more convenient three parameters version of Begin() which covers the common uses better.
  • Added mouse cursor types handling (resize, move, text input cursors, etc.) that user can query with GetMouseCursor(). Added demo and instructions in ShowTestWindow().
  • Added embedded mouse cursor data for MouseDrawCursor software cursor rendering, for consoles/tablets/etc. (#155).
  • Added first version of BeginPopup/EndPopup() helper API to create popup menus. Popups automatically lock their position to the mouse cursor when first appearing. They close automatically when clicking outside, and inhibit hovering items from other windows when active (to allow for clicking outside). (#126)
  • Added thickness parameter to ImDrawList::AddLine().
  • Added ImDrawList::PushClipRectFullScreen() helper.
  • Added style.DisplaySafeAreaPadding which was previously hard-coded (useful if you can't see the edges of your display, e.g. TV screens).
  • Added CalcItemRectClosestPoint() helper.
  • Added GetMouseDragDelta(), IsMouseDragging() helpers, given a mouse button and an optional "unlock" threshold. Added io.MouseDragThreshold setting. (#167)
  • IsItemHovered() return false if another widget is active, aka we can't use what we are hovering now.
  • Added IsItemHoveredRect() if old behavior of IsItemHovered() is needed (e.g. for implementing the drop side of a drag'n drop operation).
  • IsItemhovered() include space taken by label and behave consistently for all widgets (#145)
  • Auto-filling child window feed their content size to parent (#170)
  • InputText() removed the odd ~ characters when clipping.
  • InputText() update its width in case of resize initiated programmatically while the widget is active.
  • InputText() last active preserve scrolling position. Reset scroll if widget size becomes bigger than contents.
  • Selectable(): not specifying a width defaults to using max of label width and remaining width.
  • Selectable(const char*, bool) version has bool defaulting to false.
  • Selectable(): fixed misusage of GetContentRegionMax().x leaking into auto-fitting.
  • Windows starting Collapsed runs initial auto-fit to retrieve a width for their title bar (#175)
  • Fixed new window from having an incorrect content size on their first frame, if queried by user. Fixed SetWindowPos/SetNextWindowPos having a side-effect size computation (#175)
  • InputFloat(): fixed label alignment if total widget width forcefully bigger than space available.
  • Auto contents size aware of enforced vertical scrollbar if window is larger than display size.
  • Fixed new windows auto-fitting bigger than their .ini saved size. This was a bug but it may be a desirable effect sometimes, may reconsider it.
  • Fixed negative clipping rectangle when collapsing windows that could affect manual submission to ImDrawList and end-user rendering function if unhandled (#177)
  • Fixed bounding measurement of empty groups (fix #162)
  • Fixed assignment order in Begin() making auto-fit size effectively lag by one frame. Also disabling "clamp into view" while windows are auto-fitting so that auto-fitting window in corners don't get pushed away.
  • Fixed MouseClickedPos not updated on double-click update (#167)
  • Fixed MouseDrawCursor feature submitting an empty trailing command in the draw list. Fixed unmerged draw calls for software mouse cursor.
  • Fixed double-clicking on resize grip keeping the grip active if mouse button is kept held.
  • Bounding box tests exclude higher bound, so touching items (zero spacing) don't report double hover when cursor is on edge.
  • Setting io.LogFilename to NULL disable default LogToFile() (part of #175)
  • Tweak stb_textedit integration to be lenient if another piece of code are leaking their STB_TEXTEDIT definitions/symbols.
  • Shutdown() freeing a few extra vectors so they don't have to freed by destruction (#169)
  • Examples: OpenGL2/3 examples automatically hide the OS mouse cursor if software cursor rendering is used.
  • ShowTestWindow: Added Widgets Alignment demo under Layout section
  • ShowTestWindow: Added simple dragging widget example.
  • ShowTestWindow: Graph has checkbox under the label, also demo using BeginGroup/EndGroup().
  • ShowTestWindow: Using SetNextWindowSize() in examples to encourage its use.
  • Fixes, tweaks, comments.

popups

v1.36

18 Mar 09:44
Compare
Choose a tag to compare
  • Added ImGui::GetVersion(), IMGUI_VERSION (#127)
  • Added BeginGroup()/EndGroup() layout tools (#160).
  • Added Indent() / Unindent().
  • Added InputInt2(), InputInt3(), InputInt4() for completeness.
  • Added GetItemRectSize().
  • Added VSliderFloat(), VSliderInt(), vertical sliders.
  • Added IsRootWindowFocused(), IsRootWindowOrAnyChildFocused().
  • Added io.KeyAlt + support in examples apps, in prevision for future usage of Alt modifier (was missing).
  • Added ImGuiStyleVar_GrabMinSize enum value for PushStyleVar().
  • Various fixes related to vertical alignment of text after widget of varied sizes. Allow for multiple blocks of multiple lines text on the same "line". Added demos.
  • Explicit size passed to Plot*(), Button() includes the frame padding.
  • Style: Changed default Border and Column border colors to be most subtle.
  • Renamed style.TreeNodeSpacing to style.IndentSpacing, ImGuiStyleVar_TreeNodeSpacing to ImGuiStyleVar_IndentSpacing.
  • Renamed GetWindowIsFocused() to IsWindowFocused(), kept inline redirection with old name (will obsolete).
  • Renamed GetItemRectMin()/GetItemRectMax() to GetItemRectMin()/GetItemRectMax(), kept inline redirection with old name (will obsolete).
  • Sliders: Fast-path when power=1.0f, also makes code easier to read.
  • Sliders: Fixed parsing of decimal precision back from format string when using %%.
  • Sliders: Fixed hovering bounding test excluding padding between outer frame and grab (there was a few pixels dead-zone).
  • Separator() logs itself as text when passing through text log.
  • Optimisation: TreeNodeV() early out if SkipItems is set without formatting.
  • Moved various static buffers into state. Increase the formatted string buffer from 1K to 3K.
  • Examples: Example console keeps focus on input box at all times.
  • Examples: Updated to GLFW 3.1. Moved to examples/libs/ folder.
  • Examples: Added 64-bit projects for MSVC.
  • Examples: Increase warning level from /W3 to /W4 for MSVC.
  • Examples: DirectX9: fixed duplicate creation of vertex buffer.
  • Renamed internal type ImGuiAabb to ImRect. Changed mentions of 'box' or 'aabb' to say 'rect'.
  • Tweaks, minor fixes and comments.

groups

sliders

v1.35

09 Mar 17:53
Compare
Choose a tag to compare
  • Examples: refactored all examples application to make it easier to isolate and grab the code you need for OpenGL 2/3, DirectX 9/11, and toward a more sensible format for samples.
  • Scrollbar grab have a minimum size (style.GrabSizeMin), always visible even with huge scroll amount. (#150).
  • Scrollbar: Clicking inside the grab box doesn't modify scroll value. Subsequent movement always relative.
  • Added "###" labelling syntax to pass a label that isn't part of the hashed ID (#107), e.g. ("%d###static_id",rand()).
  • Added GetColumnIndex(), GetColumnsCount() (#154)
  • Added GetScrollPosY(), GetScrollMaxY().
  • Fixed the Chinese/Japanese glyph ranges; include missing punctuations (#156)
  • Fixed Combo() and ListBox() labels not included in declared size, for use with SameLine(), etc. (fix #149, #151).
  • Fixed ListBoxHeader() incorrect handling of SkipItems early out when window is collapsed.
  • Fixed using IsItemHovered() after EndChild() (#151)
  • Fixed malformed UTF-8 decoding errors leading to infinite loops (#158)
  • InputText() handles buffer limit correctly for multi-byte UTF-8 characters, won't insert an incomplete UTF-8 character when reaching buffer limit (fix #158)
  • Handle double-width space (0x3000) in various places the same as single-width spaces, for Chinese/Japanese users.
  • Collapse triangle uses text color (not border color).
  • Fixed font fallback glyph width.
  • Renamed style.ScrollBarWidth to style.ScrollbarWidth to be consistent with other casing.
  • Windows: setup a default handler for ImeSetInputScreenPosFn so the IME dialog (for Japanese/Chinese, etc.) is positioned correctly as you input text.
  • Windows: default clipboard handlers for Windows handle UTF-8.
  • Examples: Fixed DirectX 9/11 examples applications handling of Microsoft IME.
  • Examples: Allow DirectX 9/11 examples applications to resize the window.
  • ShowTestWindow: Fixed "undo" button of custom rendering applet.
  • ShowTestWindow: Added "Manipulating Window Title" example.

animated titles