This release adds initial support for multi-pass layout, which is a tool to circumvent a common limitation of immediate mode.
 You can use the new Ui

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-09-27 07:00:03

This release adds initial support for multi-pass layout, which is a tool to circumvent a common limitation of immediate mode. You can use the new UiBuilder::sizing_pass (#4969) to instruct the Ui and widgets to shrink to their minimum size, then store that size. Then call the new Context::request_discard (#5059) to discard the visual output and do another pass immediately after the current finishes. Together, this allows more advanced layouts that is normally not possible in immediate mode. So far this is only used by egui::Grid to hide the "first-frame jitters" that would sometimes happen before, but 3rd party libraries can also use it to do much more advanced things.

There is also a new UiBuilder for more flexible construction of Uis (#4969). By specifying a sense for the Ui you can make it respond to clicks and drags, reading the result with the new Ui::response (#5054). Among other things, you can use this to create buttons that contain arbitrary widgets.

0.29 also adds improve support for automatic switching between light and dark mode. You can now set up a custom Style for both dark and light mode, and have egui follow the system preference (#4744 #4860).

Leave a Comment