v0.12.0
This release removes the last invalid Condition value from the safe API and splits several overly broad flag sets into type-safe options so Dear ImGui's runtime assertions can no longer be triggered from normal Rust code. It also aligns the unified release train to 0.12.0 across the workspace.
Highlights
- Remove
Condition::Neverand make APIs that previously accepted invalid or overloaded condition/flag values use explicit option types instead. - Split the combo, table, color, tab, popup, multi-select, shortcut routing, drag/drop, and drag/slider APIs so mutually exclusive Dear ImGui choices cannot be combined accidentally.
- Update
dear-imgui-reflectso numeric widget helpers route slider and drag flags through the correct safe wrapper types.
Breaking Changes
- Core (
dear-imgui-rs)- Remove
Condition::Never. - Change
Window::content_size(...)to accept only the size vector. - Replace several public flag arguments with explicit option types or narrower flag sets:
DragDropPayloadCond,ShortcutFlags,ShortcutOptions,ShortcutRoute,NextItemShortcutFlags,NextItemShortcutOptions,ItemKeyOwnerFlags,DragFlags,ComboBoxOptions,TableOptions,TableColumnWidth,TableColumnIndent,TableColumnStateFlags,ColorEditOptions,ColorPickerOptions,ColorButtonOptions,TabBarOptions,TabItemOptions,PopupContextOptions,MultiSelectOptions,MultiSelectBoxSelect,MultiSelectScopeKind,DrawCornerFlags, andPolylineFlags. - Update builder/setup structs to store typed options directly, including
ComboBox::options,TableColumnSetup::width, andTableColumnSetup::indent. - Remove the ambiguous
TableColumnSetup::init_width_or_weight()helper in favor offixed_width()andstretch_weight().
- Remove
- Extensions
dear-imgui-reflect: numericwrap_aroundnow applies to drag widgets only.
Migration Guide
- Replace
Condition::Neverwith the nearest valid intent, usuallyCondition::Always,Condition::Once, orCondition::FirstUseEver. - For one-choice flag domains, move the choice into the dedicated option type instead of OR-ing unrelated bits together.
// before
// ui.shortcut_with_flags(chord, ShortcutFlags::REPEAT | ShortcutFlags::ROUTE_GLOBAL);
//
// after
ui.shortcut_with_flags(
chord,
ShortcutOptions::new()
.flags(ShortcutFlags::REPEAT)
.route(ShortcutRoute::Global(ShortcutGlobalRouteFlags::NONE)),
);- Update code that passed mixed flag domains to the new typed options instead of OR-ing everything into one flag value. The main new types are
ShortcutOptions,ShortcutRoute,TableColumnIndent,MultiSelectClickPolicy,MultiSelectBoxSelect,MultiSelectScopeKind,DrawCornerFlags, andPolylineFlags. - For rounded rectangles and image corners, use
DrawCornerFlags. For closed paths, setPolylineBuilder::closed(true)or passPolylineFlagsonly to polyline/path APIs. - For table columns, move width and indentation into the typed helpers instead of encoding them into
TableColumnFlags.
// before
// ui.table_setup_column("Name", TableColumnFlags::INDENT_ENABLE, Some(140.0), 0);
//
// after
ui.table_setup_column_with_indent(
"Name",
TableColumnFlags::NONE,
Some(TableColumnWidth::Fixed(140.0)),
Some(TableColumnIndent::Enable),
0,
);- Replace
TableColumnSetup::init_width_or_weight()withfixed_width()orstretch_weight(), and move indentation toTableColumnSetup::indent(...)orindent_enabled(...). - When touching shortcut routing or multi-select, split the former combined flags into the dedicated option types before passing them into the API.
Changed
- Backends
- Update the default WGPU 29 dependency family to
29.0.3, SDL3 bindings tosdl30.18.3/sdl3-sys0.6.5+SDL-3.4.8, and the WASM binding stack towasm-bindgen0.2.121/web-sysandjs-sys0.3.98. - Re-export the selected WGPU crate as
dear_imgui_wgpu::wgpuso tests and downstream integrations can name the exact WGPU major chosen bydear-imgui-wgpu's feature flags.
- Update the default WGPU 29 dependency family to
Fixed
- Core (
dear-imgui-rs)- Fixes #27, thanks @belst. Remove the invalid
Condition::Nevervalue that could reach Dear ImGui's assertion paths, and tighten the APIs that previously exposed unsupported condition values in helper builders. - Split tab bar fitting policy, table column indent policy, context popup mouse button, and multi-select click/box/scope policies out of their corresponding public flag sets so normal Rust code cannot combine invalid single-choice flag values or request
NavWrapXoutside Dear ImGui's supported window scope. - Split shortcut routing policy out of
ShortcutFlagsandNextItemShortcutFlags, and type global-only routing modifiers separately, so normal Rust code cannot combine route modes that Dear ImGui rejects. - Split rectangle corner rounding and polyline/path-stroke flags into
DrawCornerFlagsandPolylineFlags, soImDrawFlags_Closedcan no longer be passed to rounded rectangle APIs that reject it.
- Fixes #27, thanks @belst. Remove the invalid
- Extensions
dear-imgui-reflect: route slider and drag numeric flags through distinct helper methods so the derived widgets no longer emit invalid flag combinations for Dear ImGui.