cursive/examples/dialog.rs
Alexandre Bury f28ac264f1 Add prelude import module
Update examples to use it.
2016-07-20 21:25:14 -07:00

17 lines
418 B
Rust

extern crate cursive;
use cursive::prelude::*;
fn main() {
// Creates the cursive root - required for every application.
let mut siv = Cursive::new();
// Creates a dialog with a single "Quit" button
siv.add_layer(Dialog::new(TextView::new("Hello Dialog!"))
.title("Cursive")
.button("Quit", |s| s.quit()));
// Starts the event loop.
siv.run();
}