egui-modal, a modal library for egui
normal usage:
/* calling every frame */
let modal = new;
// What goes inside the modal
modal.show;
if ui.button.clicked
dialog usage
in some use cases, it may be more convenient to both open and style the modal as a dialog as a one-time action, like on the single instance of a function's return.
/* calling every frame */
let modal = new;
...
...
...
// Show the dialog
modal.show_dialog;
elsewhere,
/* happens once */
if let Ok = my_function