Most notable change is the update from Dear ImGui 1.89.2 (previously was on v1.87). As it impacts the Rust bindings, the most significant change is the event based IO system, which is now used by the winit and sd2l support crates by default. As with the upstream change, this should be backwards compatible with old platform-support code (i.e no changes should be required), but updating to the new should be quite straight forward, might result in simpler code, and acts better at low frame rates (e.g when there are multiple mouse-clicks within one frame)
The freetype feature should be easier to use on Windows by being able source freetype via vcpkg (in addition to pkg-config more typically used on Linux)
Finally, the examples have been rearranged to be more consistent, and hopefully easier to find. Mainly just all the crates now have an examples folder (with the exception of the low-level imgui-sys crate), and there is an example of how to use imgui-glium-renderer which is consistent with imgui-glow-renderer
Thanks everyone for the PR's and the testing/feedback in the Issues section!
Breaking: Removed im_str! macro - deprecated since v0.8.
ui.button(im_str!("Example")) just becomes ui.button("Example") and ui.button(&im_str!("My age is {}", 100)) becomes ui.button!(format!("My age is {}", 100))
Breaking: Updated to Dear ImGui 1.89.2.
This introduces some breaking changes like the imgui::Key now contains a full set of keys (previously it was a small subset of to cover copy/paste/undo)
Also note Key::KeyPadEnter was renamed to KeypadEnter
freetype feature can now locate required libraries either via pkg-config or vcpkg
Breaking (partially): ImageButton::new is now deprecated, replaced by ui.image_button_config(...).
The old new method should be backwards-compatible in most common situations. Exception is if the ImageButton builder struct was explicitly specified, say in a method like fn configure_my_button(button: &mut imgui::ImageButton) (in which case either change ImageButton to ImageButtonDeprecated, or update to the new constructor)
Breaking: Key, StyleColor, and StyleVar enums are now marked as non-exhaustive.
Updated imgui-winit-support and imgui-sdl2-support to use new "event based IO" (detailed in the Dear ImGui 1.87 release notes, but basically it aims to improve behaviour at low frame rates). Existing custom backends should work without changes, but are advised to update to the new API.
Accept usize and isize for parameters which use DataTypeKind (such as Ui::input_scalar). This treats them as u64/i64 (or u32/i32) as appropriate
The examples directories have been reorganized slightly.
There is now an example in imgui-glium-renderer showing basic usage, consistent with the glow.
[0.9.0] - 2022-11-30
MSRV is now 1.57. We soft-updated to this to Rust 1.54 in the v0.8.0 release (with a feature min-const-generics), which has now been removed (and as such, we resume having no default features). Rust 1.56 is required for the Rust 2021 edition, and 1.57 is required by some dependencies
Upgraded from Dear ImGui 1.84.2 to 1.86. See the 1.85 and the 1.86 release notes
Upgraded winit version to v0.27 for imgu-winit-support
The imgui-winit-support and imgui-glow-renderer re-export winit and glow respectively to make setup easier for simple projects. [PR #676](imgui-rs/imgui-rs#676)
BREAKING: Removed push_style_colors and push_style_vars. Instead, use push_style_color in a loop. This was deprecated in 0.7.0 and should have been removed in 0.8.0. This also removes their associated tokens.
BREAKING: Ui now does not have a lifetime associated with it, but is only ever given to users in the form of &mut Ui. Additionally, the render function has been moved to the Context instead of Ui.
BREAKING: SharedFontAtlas now hides an Rc within its wrapper -- this simplifies the codebase and more accurately reflects how we expect SharedFontAtlas to be used (ie, you're probably going to set it up once, and then give it around, rather than constantly edit it). SharedFontAtlas users, if this change is very bad for you, please let us know with issues!
BREAKING: Id is now a simpler facade, but requires the Ui struct to generate. push_id, equally, has been split into multiple functions for simplicity. New example imgui-examples/examples/id_wrangling.rs shows some of the push_id usage
BREAKING: We now only support glium 0.30. We're in a difficult position supporting arbitrary glium versions in our renderer, since glium is only in a semi-maintained state. glium users, please get in contact in issues to let us know what will work best for your needs!
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on imgui to permit the latest version.
Release notes
Sourced from imgui's releases.
Changelog
Sourced from imgui's changelog.
... (truncated)
Commits
fcc4263
Bump to v0.10068275e
Note in changelog about KeyPadEnter to KeypadEnterc0f9035
Fixes for doc-links5a43f28
Misc doc strings1f6195d
Mark Id::Str(...) etc as #[deprecated]90a4df3
freetype: Supress warning from imgui93cde6a
Merge pull request #701 from rodrigorc/FixWinitKeyboard1316240
rustfmt9473c24
Qualify missing 'Key'2106e17
Fix keyboard modifiers in Winit with the new ImGui version.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)