cursive/examples/dialog.rs

16 lines
349 B
Rust
Raw Permalink Normal View History

2015-05-16 21:02:15 +00:00
extern crate cursive;
use cursive::Cursive;
use cursive::view::{TextView,Dialog};
fn main() {
let mut siv = Cursive::new();
// Creates a dialog with a single "Quit" button
siv.add_layer(Dialog::new(TextView::new("Hello Dialog!"))
2015-05-22 06:29:49 +00:00
.title("Cursive")
2015-05-24 00:07:22 +00:00
.button("Quit", |s| s.quit()));
2015-05-16 21:02:15 +00:00
siv.run();
}