Add input focus element
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
6175cb9ee8
commit
9f96bd6cd1
2 changed files with 6 additions and 1 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 782758189e42c3bea7f72dd2d55d801c4a5748c1
|
||||
Subproject commit 9747c151bc39fe940f3bf82a46775c7f50b71d32
|
|
@ -150,6 +150,7 @@ impl App {
|
|||
);
|
||||
frame.render_widget(&self.binary_search_hint, layout[1]);
|
||||
|
||||
let mut cursor_set = false;
|
||||
for (block, num) in layout_code_blocks.iter().copied().zip(
|
||||
self.binary_search_hint
|
||||
.numbers_guessed
|
||||
|
@ -157,6 +158,10 @@ impl App {
|
|||
.map(|num| Cow::Owned(format!("{}", *num)))
|
||||
.chain(std::iter::repeat(Cow::Borrowed(" "))),
|
||||
) {
|
||||
if !cursor_set && num == " " && self.current_effect.done() {
|
||||
frame.set_cursor_position((block.x + 1, block.y + 1));
|
||||
cursor_set = true;
|
||||
}
|
||||
frame.render_widget(
|
||||
Paragraph::new(num)
|
||||
.block(Block::new().borders(Borders::all()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue