From 5efd97fbdce0cf7de71a6bf8d56ad5a5fd3225ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Fri, 19 Mar 2021 13:08:07 +0100 Subject: initial commit Trying out crossterm. --- src/main.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main.rs (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..7c12a7c --- /dev/null +++ b/src/main.rs @@ -0,0 +1,14 @@ +use std::io::{Write, stdout}; +use crossterm::{cursor, execute, terminal}; + +fn main() { + let mut stdout = stdout(); + + execute!(stdout, terminal::Clear(terminal::ClearType::All)).unwrap(); + execute!(stdout, cursor::MoveTo(5, 5)).unwrap(); + write!(stdout, "wowee").unwrap(); + execute!(stdout, cursor::MoveTo(5, 7)).unwrap(); + write!(stdout, "eewow").unwrap(); + execute!(stdout, cursor::MoveTo(5, 7)).unwrap(); + write!(stdout, "WOWEE").unwrap(); +} -- cgit v1.2.1