diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..d8350b3 --- /dev/null +++ b/build.sh @@ -0,0 +1,4 @@ +# This script builds the application WITHOUT using dependencies on the system! +# THE POWER OF DOCKER! +clear +docker run --rm -t -v "$PWD:/src:ro,z" -v "$PWD/build:/app:Z" tasky \ No newline at end of file diff --git a/src/interface.rs b/src/interface.rs index 8be6f77..0116fee 100644 --- a/src/interface.rs +++ b/src/interface.rs @@ -1,6 +1,6 @@ // Libraries use crate::{board, card, manager}; -use std::{io, process::exit}; +use std::{io::{self, Write}, process::exit}; // Constants const COLOR_ERROR: &str = "\x1b[31m"; @@ -318,11 +318,18 @@ impl<'a> Interface<'a> { self.on = (self.manager.boards.len()-1) as u32; } + fn clear(){ + println!("\x1B[2J\x1B[1;1H"); + io::stdout().flush().unwrap(); + } fn error(msg: &str){ println!("INTERFACE ERROR: {}", msg); } pub fn run(&mut self) { + // Clearing the screen + Interface::clear(); + // Based on the page do something match self.page { 0 => self.p_0(),