mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 22:30:03 -04:00
trait App now has fn name() for specifying egui_glium window title
This commit is contained in:
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Changed
|
||||
|
||||
* `egui_glium::run`: the parameter `app` now has signature `Box<dyn App>` (you need to add `Box::new(app)` to your code).
|
||||
* Window title is now passed via the `trait` function `egui::App::name()`
|
||||
|
||||
### Fixed 🐛
|
||||
|
||||
|
||||
@@ -64,11 +64,11 @@ fn create_display(
|
||||
}
|
||||
|
||||
/// Run an egui app
|
||||
pub fn run(title: &str, mut storage: Box<dyn egui::app::Storage>, mut app: Box<dyn App>) -> ! {
|
||||
pub fn run(mut storage: Box<dyn egui::app::Storage>, mut app: Box<dyn App>) -> ! {
|
||||
let window_settings: Option<WindowSettings> =
|
||||
egui::app::get_value(storage.as_ref(), WINDOW_KEY);
|
||||
let event_loop = glutin::event_loop::EventLoop::with_user_event();
|
||||
let display = create_display(title, window_settings, &event_loop);
|
||||
let display = create_display(app.name(), window_settings, &event_loop);
|
||||
|
||||
let repaint_signal = std::sync::Arc::new(GliumRepaintSignal(event_loop.create_proxy()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user