mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-10 03:10:41 +00:00
f28ac264f1
Update examples to use it.
15 lines
280 B
Rust
15 lines
280 B
Rust
extern crate cursive;
|
|
|
|
use cursive::prelude::*;
|
|
|
|
fn main() {
|
|
let mut siv = Cursive::new();
|
|
|
|
// We can quit by pressing q
|
|
siv.add_global_callback('q', |s| s.quit());
|
|
|
|
siv.add_layer(TextView::new("Hello World!\nPress q to quit the application."));
|
|
|
|
siv.run();
|
|
}
|