Dots may differ.
This commit is contained in:
parent
3039af5aee
commit
84a2a11d79
2 changed files with 6 additions and 6 deletions
|
@ -207,9 +207,9 @@ impl Clock {
|
||||||
write!(stdout,
|
write!(stdout,
|
||||||
"{}{}{}{}",
|
"{}{}{}{}",
|
||||||
cursor::Goto(pos.col, pos.line + 1),
|
cursor::Goto(pos.col, pos.line + 1),
|
||||||
self.font.dot,
|
self.font.dots.0,
|
||||||
cursor::Goto(pos.col, pos.line + 3),
|
cursor::Goto(pos.col, pos.line + 3),
|
||||||
self.font.dot,
|
self.font.dots.1,
|
||||||
)?;
|
)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,14 +4,14 @@ const DIGIT_HEIGHT: u16 = 5;
|
||||||
pub struct Font {
|
pub struct Font {
|
||||||
pub height: u16,
|
pub height: u16,
|
||||||
pub width: u16,
|
pub width: u16,
|
||||||
pub dot: char,
|
pub dots: (char, char),
|
||||||
pub digits: [[&'static str; DIGIT_HEIGHT as usize]; 10],
|
pub digits: [[&'static str; DIGIT_HEIGHT as usize]; 10],
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const NORMAL: Font = Font {
|
pub const NORMAL: Font = Font {
|
||||||
height: DIGIT_HEIGHT,
|
height: DIGIT_HEIGHT,
|
||||||
width: 5,
|
width: 5,
|
||||||
dot: '■',
|
dots: ('■', '■'),
|
||||||
digits: [[
|
digits: [[
|
||||||
// 0
|
// 0
|
||||||
"█▀▀▀█",
|
"█▀▀▀█",
|
||||||
|
@ -88,7 +88,7 @@ pub const NORMAL: Font = Font {
|
||||||
pub const PLAIN: Font = Font {
|
pub const PLAIN: Font = Font {
|
||||||
height: DIGIT_HEIGHT,
|
height: DIGIT_HEIGHT,
|
||||||
width: 5,
|
width: 5,
|
||||||
dot: '█',
|
dots: ('█', '█'),
|
||||||
digits: [[
|
digits: [[
|
||||||
// 0
|
// 0
|
||||||
"█████",
|
"█████",
|
||||||
|
@ -165,7 +165,7 @@ pub const PLAIN: Font = Font {
|
||||||
pub const CHROME: Font = Font {
|
pub const CHROME: Font = Font {
|
||||||
height: DIGIT_HEIGHT,
|
height: DIGIT_HEIGHT,
|
||||||
width: 5,
|
width: 5,
|
||||||
dot: '■',
|
dots: ('▄', '🮏'),
|
||||||
digits: [[
|
digits: [[
|
||||||
// 0
|
// 0
|
||||||
"█▀▀▀█",
|
"█▀▀▀█",
|
||||||
|
|
Loading…
Reference in a new issue