1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Add Ui::close and Response::should_close (#5729)

This adds a generic way of telling containers to close from their child
`Ui`s.

* Part of #5727 
* [x] I have followed the instructions in the PR template

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
lucasmerlin
2025-02-20 17:59:29 +01:00
committed by GitHub
parent 264749b8af
commit f5b058b908
21 changed files with 233 additions and 52 deletions

View File

@@ -384,12 +384,12 @@ impl WrapApp {
.clicked()
{
ui.ctx().memory_mut(|mem| *mem = Default::default());
ui.close_menu();
ui.close();
}
if ui.button("Reset everything").clicked() {
*cmd = Command::ResetEverything;
ui.close_menu();
ui.close();
}
});
}