Add number hints to edges
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
25ae1d3cef
commit
466f968aff
1 changed files with 9 additions and 0 deletions
|
@ -349,6 +349,15 @@ impl Widget for &BinarySearchHint {
|
|||
}
|
||||
}
|
||||
|
||||
for number_hint in [0, 9] {
|
||||
let number_x = area.x + (number_hint as f64 / ruler_scale) as u16;
|
||||
let style = Style::default()
|
||||
.fg(Color::Rgb(226, 190, 89))
|
||||
.bg(PASSWORD_BACKGROUND);
|
||||
buf.set_string(number_x, area.y + 1, "|", style);
|
||||
buf.set_string(number_x, area.y, format!("{}", number_hint), style);
|
||||
}
|
||||
|
||||
if self.failed_guesses >= 30 {
|
||||
let guess_hint = self.range.start + ((self.range.end - self.range.start) / 2);
|
||||
let number_x = area.x + (guess_hint as f64 / ruler_scale) as u16;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue