mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-10 03:10:41 +00:00
f28ac264f1
Update examples to use it.
17 lines
418 B
Rust
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();
|
|
}
|