egui-modal 0.1.2

a modal library for egui
Documentation
egui-modal-0.1.2 has been yanked.

egui-modal, a modal library for egui

crates.io docs license

modal

usage:

let modal = Modal::new(ctx, "my_modal");

// What goes inside the modal
modal.show(|ui| {
    modal.title(ui, "My modal");
    modal.body(ui, "This is a modal");
    modal.buttons(ui, |ui| {
        // After clicking, the modal is automatically closed
        if modal.button("A button").clicked() {
            println!("Hello world!")
        };
    });
});

if ui.button("Open the modal").clicked() {
    // Show the modal
    modal.open();
}