mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
d684a5bc1e
Add `traits` module instead
17 lines
344 B
Rust
17 lines
344 B
Rust
extern crate cursive;
|
|
|
|
use cursive::Cursive;
|
|
use cursive::views::TextView;
|
|
|
|
fn main() {
|
|
let mut siv = Cursive::new();
|
|
|
|
// We can quit by pressing `q`
|
|
siv.add_global_callback('q', Cursive::quit);
|
|
|
|
siv.add_layer(TextView::new("Hello World!\n\
|
|
Press q to quit the application."));
|
|
|
|
siv.run();
|
|
}
|