Closed zkldi closed 9 months ago
This is fixed in the newest release of rfd.
Here's some example code incase anyone finds this issue through google:
let choice = rfd::MessageDialog::new()
.set_title("My App")
.set_description(format!(
"Save changes you made?",
))
.set_buttons(rfd::MessageButtons::YesNoCancel)
.show();
match choice {
rfd::MessageDialogResult::Yes => {
// save, close
},
rfd::MessageDialogResult::No => {
// don't save, close.
}
rfd::MessageDialogResult::Cancel => {
// don't close.
}
_ => {
// can't happen.
}
}
I'd like to represent a dialog like this in my application:![image](https://github.com/PolyMeilex/rfd/assets/20380519/84b5b6cc-5ed8-4549-8631-32930bcbdb94)
I don't think this is possible currently, as there's no way to have three buttons -- nor distinguish between "No" being clicked and "Cancel".
Is it possible to add support for this? Thanks.