MyGit

0.28.0

emilk/egui

版本发布时间: 2024-07-03 21:02:35

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/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

egui changelog

✨ Highlights

🧳 Migration

⭐ Added

🔧 Changed

🐛 Fixed

eframe changelog

✨ Highlights

The eframe web canvas now works properly when its a small part of a larger web page. Previously this caused a lot of weird bugs, such as the eframe canvas stealing focus, and resizing the canvas in annoying ways. Now it should all work seamlessly to have an eframe canvas as part of a web page, including having multiple different eframe apps next to each other. As part of that the eframe canvas can now be focused (or not), just like an <input> HTML element.

We've also implemented a better method for sizing and positioning the canvas so that it yields pixel-perfect rendering on all known browsers except for Desktop Safari. What this means is that text is much less likely to be blurry on web for users (#4536 by @jprochazk).

⭐ Added

🔧 Changed

🐛 Fixed

🧳 Migration

Wrap app creator in a Result

Applications can now return an error during the app creation (#4565 by @emilk), so you now need to wrap your Box<dyn App> in a Result like so:

- eframe::run_native("My App", options, Box::new(|cc| Box::new(MyApp::new(cc))));
+ eframe::run_native("My App", options, Box::new(|cc| Ok(Box::new(MyApp::new(cc)))));

Change web CSS

To make the eframe canvas fill the entire web browser, set its CSS to:

top: 0;
left: 0;
width: 100%;
height: 100%;

See index.html and #4536 for details.

Web canvas focus

If you are using eframe for a fullscreen app, you should call .focus() on your canvas during startup:

document.getElementById("the_canvas_id").focus();

相关地址:原始地址 下载(tar) 下载(zip)

查看:2024-07-03发行的版本