1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Now window will be destroyed if is not rendered

This commit is contained in:
Konkitoman
2023-07-18 17:52:55 +03:00
parent 8f475ef8d8
commit 28d5c6e62c
3 changed files with 20 additions and 9 deletions

View File

@@ -27,8 +27,11 @@ fn main() -> Result<(), eframe::Error> {
age += 1;
}
ui.label(format!("Hello '{name}', age {age}"));
egui::CollapsingHeader::new("W").show(ui, |ui| {
egui::Window::new("Win").show(ctx, |ui| ui.label("Inside a window!"));
egui::CollapsingHeader::new("Show Test1").show(ui, |ui| {
egui::Window::new("Test1").show(ctx, |ui| ui.label("Inside a window!"));
});
egui::CollapsingHeader::new("Shout Test2").show(ui, |ui| {
egui::Window::new("Test2").show(ctx, |ui| ui.label("Inside a window! 222"));
});
});
})