mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Now a WindowEvent::CloseRequested is received will be sent to egui_winit::State in RawInput
Now when we press the close button from a native window if the window has a open variabile connected the window will be closed
This commit is contained in:
@@ -39,16 +39,17 @@ fn main() -> Result<(), eframe::Error> {
|
||||
let clone = window1_embedded.clone();
|
||||
let embedded = *window1_embedded.read().unwrap();
|
||||
egui::CollapsingHeader::new("Show Test1").show(ui, |ui| {
|
||||
egui::Window::new("Test1")
|
||||
.embedded(embedded)
|
||||
.show(ctx, move |ui, _, _| {
|
||||
egui::Window::new("Test1").embedded(embedded).show(
|
||||
ctx,
|
||||
move |ui, id, parent_id| {
|
||||
ui.checkbox(&mut *clone.write().unwrap(), "Should embedd?");
|
||||
let ctx = ui.ctx().clone();
|
||||
ui.label(format!(
|
||||
"Current rendering window: {}",
|
||||
ctx.current_rendering_viewport()
|
||||
));
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
let clone = window2_embedded.clone();
|
||||
let embedded = *window2_embedded.read().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user