- Renamed to `ImColor32` to avoid confusion with `ImColor` from the C++. code: https://github.com/ocornut/imgui/blob/9499afdf/imgui.h#L2180 - Eventually I'd probably like to add something mirroring the actual `ImColor`. - Now supports construction and access from `const fn` where possible. - Still impossible for the `f32` APIs - Now supports `.r`/`.g`/`.b`/.a` field access (read and write), by way of a new type `imgui::color::ImColor32Fields`, which essentially exists just to serve this purpose. This is a bit cludgey, but lets us provide the ability for reading and writing `r/g/b/a` values without adding many `fn get_r(self) -> u8` and `fn set_r(&mut self, r: u8);` style functions. - No longer requires FFI calls to construct from RGB floats. - This gives much more freedom to the optimizer, as external calls are impenetrable optimization barriers (It has to pessimistially assume that they read/write to all globally accessable memory, and must be called in the exact order that is listed). - Also, it allows inlining these calls, and avoid computing the same value twice (if the args are the same). - Also improves usage from IDEs, debuggers, etc, and avoids a rare possibility of UB if NaN was passed in (however, this almost certainly could only cause problems if cross-lang LTO was used, which I believe we don't support). - This code is more complex than needed, but was taken from another project of mine (functions were renamed to line up with imgui's names), and has good (literally exhaustive) test coverage. - Unfortunately, float arithmetic in const fn is still not allowed, so for now these aren't usable `const fn`. - Added utility constants to mirror the `IM_COL32_WHITE`, `IM_COL32_BLACK`, `IM_COL32_BLACK_TRANS` constants.
22 KiB
Change Log
Unreleased
-
Ui::key_index()is now called internally when needed, and the variousis_key_foonow take aKeydirectly: https://github.com/imgui-rs/imgui-rs/pull/416is_key_down,is_key_pressed,is_key_releasedandkey_pressed_amountnow take aKeyinstead ofu32(breaking).key_indexis no longer public (breaking). If you need access to the key map, it can be accessed asui.io().key_map[key](If you need to do this, file a bug, since I'm open to exposing this if there's actually a use case).
-
winit0.23/0.24 handling has been (hopefully) fixed: https://github.com/imgui-rs/imgui-rs/pull/420 (breaking, see also https://github.com/imgui-rs/imgui-rs/issues/412).imgui-winit-support'swinit-23feature no longer supportswinitversion0.24(this caused an unintentional semver breakage before, unfortunately).imgui-winit-supporthas a newwinit-24feature for 0.24 support.- By default
imgui-winit-supportfeature now enableswinit-24, and notwinit-23(by default it will always enable the latest).
-
The
imguicrate no longer depends ongfxorgliumdirectly: https://github.com/imgui-rs/imgui-rs/pull/420 (breaking, related to the previous change).- That is, the
gfxandgliumfeatures are removed to reduce version compatibility issues going forward.- This only matters if you manually implement
gfxorgliumrenderers without using theimgui-glium-rendererorimgui-gfx-renderercrates. - In the (somewhat unlikely) case you were relying on these this, you should define your own vertex type that's layout-compatible with
imgui::DrawVert, and replace calls toimgui::DrawList::vtx_buffer()withimgui::DrawList::transmute_vtx_buffer::<MyDrawVert>(). You can seeimgui_glium_renderer::GliumDrawVertandimgui_gfx_renderer::GfxDrawVerttypes respectively for examples of this, if needed, but it should be straightforward enough if you're already implementing a renderer from scratch.
- This only matters if you manually implement
- This is admittedly less convenient, but avoids depending on any specific version of
gfxorgliumin the coreimguicrate, which will ease maintenance and reduce unintentional breakage in the future.
- That is, the
-
Non-window DrawList support has been fixed/improved: https://github.com/imgui-rs/imgui-rs/pull/414
WindowDrawListhas been renamed toDrawListMut, to reflect that it may refer to other kinds of draw lists, and is mutable, unlikeimgui::DrawList(breaking).Ui::get_background_draw_list()has been fixed when used outside of a window context, and now has an example.Ui::get_foreground_draw_list()has been added, analogous toUi::get_background_draw_list().
-
ImColor(which is a wrapper aroundu32) has been renamed toImColor32in order to avoid confusion with theImColortype from the Dear ImGui C++ code (which is a wrapper aroundImVec4). In the future anImColortype which maps more closely to the C++ one will be added.- Additionally, a number of constructor and accessor methods have been added to it
ImColor, which areconst fnwhere possible.
- Additionally, a number of constructor and accessor methods have been added to it
0.6.1 - 2020-12-16
- Support for winit 0.24.x
- Note: this change was accidentally semver-breaking, see the caveat below.
- Support multiple simultaneous winit versions in imgui-winit-support:
- The latest will be if more than one is specified, and a single warning will be logged in debug builds (based on
cfg!(debug_assertions)) at runtime if multiple are specified. - This is intended to make features behave a bit more closely to additively, and reduce the pain of using this crate in a larger workspace.
- The latest will be if more than one is specified, and a single warning will be logged in debug builds (based on
- Avoid dropping mouse events when press/release are on the same frame (macos)
- Substantial repository layout reorganization
Caveat: Semver broken in 0.6.1
This release accidentally broke semver, and should have been 0.7.0. It will be yanked when 0.7.0 is released, unless there are objections.
This happened when updating the glium/winit/glium versions, adding support for winit 0.24 and related. Unfortunately, while an attempt to avoid breakage was made, it happened regardless. This mainly happened as it was the holidays and not enough attention was paid to the changes in an urgent-sounding request for supporting the new version, and more care will be taken in the future to avoid cutting a hasty release without adequate testing.
As mentioned, this release will be yanked once 0.7.0 is released, but not before, so that users who need 0.24 support are still able to use imgui until then.
0.6.0 - 2020-11-15
Added
Io::peek_input_characters
Changed
- Upgrade to cimgui / imgui 1.79
- Upgrade to winit 0.23
- Bump minimum Rust version to 1.43
0.5.0 - 2020-09-20
Added
- Support for ConfigFlags::RENDERER_HAS_VTX_OFFSET in imgui-glium-renderer and imgui-gfx-renderer. This makes it possible to output large meshes (e.g. complex UIs) without problems when using these renderers
Ui::begin_tooltipto support using tooltips with stack tokens instead of closures- API for accessing the background drawlist
- Tab bar / tab item API
- Redesigned drag slider API
Changed
- Upgrade to cimgui / imgui 1.78
- Store per-texture sampler parameters in imgui-glium-renderer to support customizing them
- Slider widget constructors no longer require the range parameter. Call the range function on the builder to set the range.
Fixed
- Reduce unnecessary winit cursor changes which earlier caused cursor flickering or invalid cursors on some platforms (at least Windows)
Removed
- Various things that were deprecated in imgui-rs 0.4.0
0.4.0 - 2020-05-27
Added
- WebAssembly FFI shells
Changed
- Redesign tree / collapsing header API
- Bump minimum Rust version to 1.40 (at least xml-rs crate requires it)
- Upgrade to glium 0.27 / winit 0.22
- Switch Glium renderer to use GL_CLAMP_TO_BORDER
Fixed
- Bug in font name length checking
0.3.1 - 2020-03-16
Fixed
- Narrowed supported winit version range in imgui-winit-support
0.3.0 - 2020-02-15
Added
- Add
ChildWindow::movable - ImString now implements fmt::Write
Changed
- Upgrade to cimgui / imgui 1.75
- Bump minimum Rust version to 1.38 (at least backtrace crate requires it)
- Upgrade to glium 0.26 / winit 0.21
- Switch imgui-winit-support to 0.20+ by default. Winit 0.19 support is still
available via the
winit-19feature flag - Resources used by examples are no longer included in the published crate
Removed
- Various things that were deprecated in imgui-rs 0.2.0
Fixed
- Fix toggling behavior on using
MenuItem::build_with_refandSelectable::build_with_ref. - ImString nul terminator handling
0.2.1 - 2019-09-09
Fixed
- Fix backspace handling on macOS
- Fix ImageButton bool return value
0.2.0 - 2019-09-07
Added
- Window scrolling API
- Full support for the column API
- Almost all small utility functions from upstream API
- Support for winit 0.20 alpha via
winit-20feature
Changed
- Redesigned window API
- Redesigned progress bar API
- Redesigned color editor/picker API
- Redesigned child window API (previously known as child frame)
- Redesigned image / image button API
- Redesigned combo box API
- Redesigned selectable API
- Redesigned slider API. Generic scalar sliders support all main data types and replace previous individual sliders (int, int2, int3, int4, etc...)
- Redesigned menu API
- Updated layout API
- Renderer errors implement std::error::Error
- Glium renderer re-exports imgui and glium
- Gfx renderer re-exports imgui and gfx
- These functions now take/return PathBuf: log_filename, set_log_filename, ini_filename, set_logfilename
- ID stack manipulation now uses stack tokens
- Parameter stack pushes must almost always be paired by a manual call to stack pop
- Container widget tokens must be ended manually by calling end. Closure-based function (e.g. build()) are unaffected and do this automatically
- Bump minimum Rust version to 1.36 (some dependencies, including winit, require MaybeUninit)
- Upgrade to cimgui / imgui 1.72b
Removed
- Various things that were deprecated in imgui-rs 0.1.0
0.1.0 - 2019-07-12
Added
- Support for font atlas sharing
- Support for using multiple fonts
- Support for suspended contexts (useful for having multiple independent operating system windows)
- Support for DX11 in imgui-gfx-renderer
- Support for navigation input system
- Support for backend/renderer name strings
- Support for saving/loading INI settings manually
- Pluggable clipboard support
Changed
- imgui-sys is now almost completely automatically generated. This is a big breaking change in imgui-sys API
- ImGui/Context API is now safer
- The library context (known as Context, previously known as ImGui) is no longer Send or Sync
- Many getter/setter APIs have been replaced with direct access to struct fields
- [f32; 2] and [f32; 4] are now the main vector types. ImVec/ImVec4 and corresponding tuples are no longer used in the main API
- imgui-gfx-renderer is parameterized over the color format, so Rgba8 and Srgba8 are both supported
- imgui-winit-support has been rewritten to provide a more robust abstraction that is easier to use correctly
- Parameter stack (e.g. StyleVar) manipulation is now done using push functions and automatically or manually droppable stack tokens
- Upgrade to glium 0.25
- Upgrade to cimgui / imgui 1.71
- Bump minimum Rust version to 1.33
0.0.23 - 2019-04-10
Added
- Support for image buttons:
Ui::image_button Ui::set_keyboard_focus_here- Support for window position pivot
Changed
- Upgrade to gfx 0.18
Removed
- Various things that were deprecated in imgui-rs 0.0.21 and 0.0.22
0.0.22 - 2019-02-05
Added
Ui::with_test_wrap_posUi::get_content_region_maxUi::get_window_content_region_minUi::get_window_content_region_max
Changed
- Upgrade to cimgui 1.66.2+ / imgui 1.66b. This is a very big update, so there are a lot of breaking changes
- Bump minimum Rust version to 1.31 (1.28 required by the glutin crate, and 1.31 required by the stb_truetype crate)
- Upgrade to glium 0.23
- Replaced
imgui-glutin-supportwithimgui-winit-support
0.0.21 - 2018-10-11
Added
ImGui::mouse_downImGui::key_superUi::get_window_posUi::is_window_focusedUi::is_root_window_focusedUi::is_child_window_focusedUi::popup_modalimgui-glutin-supportcrate- Support for custom textures
Fixed
- Possible crash if rendering was skipped during a frame
Changed
- Bump minimum Rust version to 1.26 (required by the parking_lot_core crate)
0.0.20 - 2018-08-13
Fixed
- Clip rect regression in the glium renderer
Removed
- Various things that were deprecated in imgui-rs 0.0.19
0.0.19 - 2018-08-12
Added
- New things in imgui/cimgui 1.53.1
- Style: Add
PopupRounding,FrameBorderSize,WindowBorderSize,PopupBorderSize. - DemoWindow: Add
no_closestate. - Input: Add
no_undo_redomethod. - imgui-sys:
igStyleColorsDarkandigStyleColorsLight- DragDrop low level API
igGetFrameHeightigBeginCombo,igEndComboigSetItemDefaultFocusigGetOverlayDrawListandigGetDrawListSharedDataImFontConfig_DefaultConstructorImDrawList_AddImageRounded
- Style: Add
- Input: Add
read_onlyandpasswordmethods. - Various utility functions
- Support for changing the mouse cursor
- Custom font support
- Support for item grouping (
groupfunction) - Custom drawing with draw list manipulation
- Drag widgets
- Input: Add
input_text_multilinemethod
Changed
- Upgrade to imgui/cimgui 1.53.1
- Rename
Ui::show_test_windowtoUi::show_demo_window. Keep redirection. - Rename
sys::igGetItemsLineHeightWithSpacingtosys::igGetFrameHeightWithSpacing. Keep redirection. - Rename
ImGuiTreeNodeFlags::AllowOverlapModetoImGuiTreeNodeFlags::AllowItemOverlap.sys::igSetNextWindowContentSize(). Keep redirection. - Rename
sys::ImGuiTextBuffer_append()helper toappendf(). - Rename
ImGuiStyleVar::ChildWindowRoundingtoImGuiStyleVar::ChildRounding. Keep redirection. - Rename
StyleVar::ChildWindowRoundingtoStyleVar::ChildRounding. Keep redirection. - Rename
ImGuiCol::ChildWindowBgtoImGuiCol::ChildBg. Keep redirection.
- Rename
- Upgrade glium to 0.22.0. This updates winit to 0.16. This changes the way
HIDPI are calculated. Depending on your needs, you may want to set HIDPI to 1
by setting the environment variable
WINIT_HIDPI_FACTOR=1if you use X11. frame()now takes a singleFrameSizeargument- Bump minimum Rust version to 1.24
set_mouse_downtakes button states by value, not by reference
Deprecated
- Various imgui-sys things that were deprecated in imgui/cimgui 1.53.1
- Obsolete
sys::igIsRootWindowFocused()in favor of usingsys::igIsWindowFocused(ImGuiFocusedFlags::RootWindow). - Obsolete
sys::igIsRootWindowOrAnyChildFocused()in favor of usingsys::igIsWindowFocused(ImGuiFocusedFlags::RootAndChildWindows). - Obsolete
sys::igIsRootWindowOrAnyChildHovered()in favor of usingsys::igIsWindowHovered(ImGuiHoveredFlags::RootAndChildWindows). - Obsolete
sys::SetNextWindowContentWidth()in favor of using - ObsoleteWindow::show_borders. UseStyleVarinstead. - Obsolete
ImGuiCol::ComboBg. UsePopupBginstead.
- Obsolete
Removed
- Features that were removed in imgui/cimgui 1.53.1
- Remove
anti_aliased: boolfinal parameter ofsys::ImDrawList_AddPolylineandsys::ImDrawList_AddConvexPolyFilled. - Remove
ImGuiWindowFlags::ShowBorderswindow flag. Borders are now fully set up in the ImGuiStyle structure.
- Remove
- Various imgui-sys things that were deprecated in imgui/cimgui 1.52
0.0.18 - 2017-12-23
Added
is_item_hoveredtooltiptooltip_text
Changed
- Upgrade to imgui/cimgui 1.52
- Upgrade to glium 0.19
Deprecated
- Various imgui-sys things that were deprecated in imgui/cimgui 1.52
Removed
- Non-namespaced flags
- Various imgui-sys things that were deprecated in imgui/cimgui 1.51
Window::bg_alpha. Push a color change withwith_color_varinsteadcolor_edit3color_edit4
0.0.17 - 2017-11-07
Added
- Namespaced flags (e.g.
ImGuiWindowFlags) - Color picker widget
- Color button widget
imgui_sysis now re-exported assysin the main createimgui::get_style_color_name
Changed
- Upgrade to imgui/cimgui 1.51
- Adapt to latest cimgui API changes
- Bump minimum Rust version to 1.20
- Upgrade to bitflags 1.0
- Various minor ImString/ImStr changes
textnow accepts normal Rust strings. ImStr is still needed everywhere else
Fixed
- Default impl for ImString was incorrect and could cause a crash
Deprecated
- Non-namespaced flags
- Various imgui-sys things that were deprecated in imgui/cimgui 1.51
Window::bg_alpha. Push a color change withwith_color_varinsteadcolor_edit3. Usecolor_editinsteadcolor_edit4. Usecolor_editinstead
Removed
- ImStr -> str Deref. Use
to_strinstead.
0.0.16 - 2017-10-26
Added
- OpenGL ES 2.0+ support in gfx and glium renderers
- Separate OpenGL 2.0, 3.0, 4.0 shaders in both renderers. This should fix an issue with some systems that refuse to use old GLSL shaders with modern OpenGL contexts
ImGui::add_font_global_scale- Support for radio buttons
Changed
- Upgrade to glium 0.18
- imgui-gfx-renderer
Renderer::initnow requires ashaders: Shadersparameter. Please see examples/support_gfx/mod.rs for a shader resolution example - Bump minimum Rust version to 1.19 because some dependencies require it.
Fixed
- Glium renderer now uses MinifySamplerFilter::Nearest. This fixes a blurry font issue in some configurations
Removed
ImString::from_string_uncheckedImString::from_bytes_uncheckedImStr::from_bytes_unchecked
0.0.15 - 2017-07-23
Added
- Support for new_line function
- Support for text size calculation
- Support for scoped style customization
- Support for scoped color customization
- Support for child frames
- Unsafe ImString/ImStr creation functions for advanced users:
ImString::from_utf8_unchecked(renamed fromImString::from_bytes_unchecked)ImString::from_utf8_with_nul_uncheckedImStr::from_utf8_with_nul_unchecked(renamed fromImStr::from_bytes_unchecked)
Changed
- Button, selectable, histogram, plotlines, and progress bar accept size with
Into<ImVec2> ImString::newalways succeeds and any interior NULs truncate the string. Breaking change- All builder constructor functions (e.g. Window::new) now take
&Uireference to tie the lifetime of the builder to it. - Bumped minimum Rust version to 1.17 because some dependencies require it.
- Upgrade to glium 0.17
Deprecated
ImString::from_string_unchecked(please useImString::new)ImString::from_bytes_unchecked(renamed toImString::from_utf8_unchecked)ImStr::from_bytes_unchecked(renamed toImStr::from_utf8_with_nul_unchecked)
Fixed
- Histogram, plotlines, progressbar builders were not tied to the
&Uilifetime, so it was possible to misuse them.
0.0.14 - 2017-06-18
Added
- ImString owned type for strings
- Experimental support for gfx-rs in imgui-sys
- Experimental renderer for gfx-rs
Changed
- ImStr is now "a dear imgui -compatible string slice". This change significantly affects how strings are handled.
- Upgrade to imgui/cimgui 1.50
- Upgrade to bitflags 0.9
Fixed
- String pointer compilation problems on ARM
0.0.13 - 2017-04-25
Changed
- Make the crates publishable again after the Glium renderer separation
0.0.12 - 2017-04-25 [YANKED]
Added
- Support for progress bar
- Support for push/pop item width
- Support for ID stack manipulation (integer values)
- Support for 2-4 -element int sliders
- Support for 2-4 -element float sliders
ImVec4::zero()Intoarray and tuple conversions for ImVec2 and ImVec4- gfx 0.15 support in imgui-sys
- gfx 0.15 renderer implementation
Changed
- imgui-sys no longer includes glium support by default
- Move Glium renderer to a separate crate
Removed
Window::always_vertical_scollbar(typo)igPushStyleVavrVec(typo)ImGuiInputTextFlags::withImGuiTreeNodeFlags::withImGuiWindowFlags::with
0.0.11 - 2017-02-15
Added
ImVec2::zero()- Support for buttons
- Support for closing current popup
Window::always_vertical_scrollbar(fix typo)igPushStyleVarVec(fix typo)
Changed
- Upgrade to bitflags 0.8
- Upgrade to glium 0.16
- Replace libc dependency with
std::os::raw - Upgrade cimgui to include MinGW compilation fix
Deprecated
Window::always_vertical_scollbar(typo)igPushStyleVavrVec(typo)ImGuiInputTextFlags::withImGuiTreeNodeFlags::withImGuiWindowFlags::with
0.0.10 - 2016-08-09
Changed
- Upgrade to glium 0.15
- Examples use std::time instead of the deprecated time crate
0.0.9 - 2016-07-07
Added
- Support for columns, combo, listbox
- Support for plothistogram, plotlines
- Support for color edit widgets
- Support for int and float inputs
- Support for int and float array inputs
- Support for popups
- Support for selectable
- Better support for hidpi environments
Changed
- ImStr::as_ptr is now part of the public API
- Upgrade to bitflags 0.7
- Upgrade to imgui/cimgui 1.49
- Several imgui_sys structs have changed
- CollapsingHeader API has changed
- New window flags are supported
0.0.8 - 2016-04-15
Added
- Add a change log
Changed
- Upgrade to glium 0.14
0.0.7 - 2016-03-26
Changed
- Upgrade to imgui/cimgui 1.47
Fixed
- Fix Glium rendering error when more than one texture is used (issue #17)
0.0.6 - 2016-01-12
Changed
- Relicensed to dual MIT/Apache-2.0
- Upgrade to glium 0.13
- Upgrade to imgui/cimgui 1.46
0.0.5 - 2015-11-30
Changed
- Upgrade to glium 0.12
- Upgrade to libc 0.2
0.0.4 - 2015-10-26
Changed
- Upgrade to glium 0.10
- Lots of other changes
0.0.3 - 2015-09-27
Changed
- Upgrade to glium 0.9
- Lots of other changes
0.0.2 - 2015-08-31
Changed
- Lots of changes
0.0.1 - 2015-08-20
Added
- Initial release with cimgui/imgui 1.44, glium 0.9