cursive/examples/dialog.rs

15 lines
317 B
Rust
Raw 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!"))
.button("Quit", |s,_| s.quit()));
siv.run();
}