blob: a732c22019a363f3ec03aaa72a1b1fa5c859bf61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
extern crate rustty;
use rustty::{Terminal, Event};
use rustty::ui::Painter;
use std::time::Duration;
fn main() {
let mut term = Terminal::new().unwrap();
term.swap_buffers().unwrap();
loop {
term.printline(0, 0, "booyakacha");
let evt = term.get_event(Duration::from_millis(100)).unwrap();
if let Some(Event::Key(ch)) = evt {
match ch {
'q' => {
break;
}
c @ _ => {
}
}
}
term.swap_buffers().unwrap();
}
}
|