Highlight selected operation

This commit is contained in:
Hanno Braun 2024-11-27 19:06:48 +01:00
parent 4fcc3fc5f4
commit ae0d46c702

View File

@ -76,8 +76,12 @@ impl TextRenderer {
},
);
for op in operations.operations.iter() {
let attrs = glyphon::Attrs::new();
for (i, op) in operations.operations.iter().enumerate() {
let mut attrs = glyphon::Attrs::new();
if i == operations.selected {
attrs = attrs.color(glyphon::Color::rgb(0, 127, 0));
}
buffer.lines.push(glyphon::BufferLine::new(
format!("{op}"),