Overall commend improvement
This commit is contained in:
parent
ef09cdfdd6
commit
4005634086
@ -26,7 +26,7 @@ fn main()
|
|||||||
pub fn run()
|
pub fn run()
|
||||||
{
|
{
|
||||||
// This is represents the current screen.
|
// This is represents the current screen.
|
||||||
let screen = Screen::default();
|
let screen = Screen::new(true);
|
||||||
|
|
||||||
// set size of terminal so the map we are going to draw is fitting the screen.
|
// set size of terminal so the map we are going to draw is fitting the screen.
|
||||||
terminal(&screen).set_size(60,110);
|
terminal(&screen).set_size(60,110);
|
||||||
@ -86,10 +86,9 @@ fn print_welcome_screen(screen: &Screen)
|
|||||||
if let Some(Ok(b'q')) = a {
|
if let Some(Ok(b'q')) = a {
|
||||||
terminal.exit();
|
terminal.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// print the current counter at the line of `Seconds to Go: {counter}`
|
// print the current counter at the line of `Seconds to Go: {counter}`
|
||||||
cursor.goto(48, 10);
|
cursor.goto(48, 10);
|
||||||
crossterm.style(format!("{}", i)).with(Color::Red).on(Color::Blue).paint(&crossterm.get_screen());
|
crossterm.style(format!("{}", i)).with(Color::Red).on(Color::Blue).paint(&screen);
|
||||||
|
|
||||||
// 1 second delay
|
// 1 second delay
|
||||||
thread::sleep(time::Duration::from_secs(1));
|
thread::sleep(time::Duration::from_secs(1));
|
||||||
|
Loading…
Reference in New Issue
Block a user