0.24.0
版本发布时间: 2023-11-23 23:28:08
emilk/egui最新发布版本:0.29.0(2024-09-26 21:35:19)
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native
Try it now: https://www.egui.rs/
✨ 0.24 Highlights
You can now spawn multiple native windows on supported backends (e.g. eframe
), using the new viewport
API (#3172).
You can easily zoom any egui app using Cmd+Plus, Cmd+Minus or Cmd+0, just like in a browser (#3608).
Scrollbars are now hidden by default until you hover the ScrollArea
(#3539).
⭐ Added
- Multiple viewports/windows #3172 (thanks @konkitoman!)
- Introduce global
zoom_factor
#3608 - Floating scroll bars #3539
- Add redo support to
Undoer
#3478 (thanks @LoganDark!) - Add
egui::Vec2b
#3543 - Add max
Window
size & other size helpers #3537 (thanks @arduano!) - Allow changing shape of slider handle #3429 (thanks @YgorSouza!)
-
RawInput::viewports
contains a list of all viewports. Access the current one withctx.input(|i| i.viewport())
🔧 Changed
🐛 Fixed
- Fix upside down slider in the vertical orientation #3424 (thanks @YgorSouza!)
- Make slider step account for range start #3488 (thanks @YgorSouza!)
- Fix rounding of
ImageButton
#3531 (thanks @chriscate!) - Fix naming:
constraint_to
->constrain_to
#3438 (thanks @rinde!) - Fix Shift+Tab behavior when no widget is focused #3498 (thanks @DataTriny!)
- Fix scroll not sticking when scrollbar is hidden #3434 (thanks @LoganDark!)
- Add
#[inline]
to all builder-pattern functions #3557 - Properly reverse bool animation if value changes before it's finished #3577 (thanks @YgorSouza!)
⚠️ BREAKING
-
egui::gui_zoom::zoom_with_keyboard_shortcuts
is gone, replaced withOptions::zoom_with_keyboard
, which istrue
by default -
Spacing::scroll_bar_X
has been moved toSpacing::scroll_bar.X
-
Context::set_pixels_per_point
now callsContext::set_zoom_level
, and it may make sense for you to call that directly instead - If you are using
eframe
, check out the breaking changes in theeframe
changelog
For integrations
There are several changes relevant to integrations.
- Added
crate::RawInput::viewports
with information about all active viewports - The repaint callback set by
Context::set_request_repaint_callback
now points to which viewport should be repainted -
Context::run
now returns a list ofViewportOutput
inFullOutput
which should result in their own independent windows - There is a new
Context::set_immediate_viewport_renderer
for setting up the immediate viewport integration - If you support viewports, you need to call
Context::set_embed_viewports(false)
, or all new viewports will be embedded (the default behavior)