aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index e7a11a9..a732c22 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,28 @@
+extern crate rustty;
+
+use rustty::{Terminal, Event};
+use rustty::ui::Painter;
+
+use std::time::Duration;
+
fn main() {
- println!("Hello, world!");
+ 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();
+ }
}