sneakers: clear screen

This commit is contained in:
Greg Shuflin 2023-11-16 21:13:15 -08:00
parent 733693258c
commit 6f1e1fb3cf
2 changed files with 6 additions and 1 deletions

View File

@ -70,7 +70,7 @@ pub extern "C" fn rust_main() {
if args.clear_screen {
unsafe {
nmstermio_set_clearscr(2);
nmstermio_set_clearscr(1);
}
}

View File

@ -19,6 +19,11 @@ const foot2Center: &str = "[ ] Select Option or ESC to Abort";
pub extern "C" fn rust_sneakers_effect() {
use std::time::Duration;
unsafe {
crate::nmstermio_set_clearscr(1);
}
let (term_width, _term_height) = crossterm::terminal::size().expect("Error reading terminal size");
let term_width = term_width as usize;
let mut buf = String::new();