How to handle Cancel
or X
?
#26
Answered
by
Barugon
shevernitskiy
asked this question in
Q&A
-
I need to close app if file selection was skipped by |
Beta Was this translation helpful? Give feedback.
Answered by
Barugon
Nov 10, 2023
Replies: 2 comments 2 replies
-
Something like this: match file_dlg.state() {
egui_file::State::Open => {
// Dialog is visible.
}
egui_file::State::Closed => {
// Dialog is not visible.
}
egui_file::State::Cancelled => {
// Canceled via cancel button or X button.
frame.close();
}
egui_file::State::Selected => {
// File (or folder, for DialogType::SelectFolder) was selected.
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
shevernitskiy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this: