Render list of operations (incorrectly)

This renders all operation names into one place. Work in progress!
This commit is contained in:
Hanno Braun 2024-11-25 23:08:13 +01:00
parent f745509849
commit ab7f435d06

View File

@ -70,21 +70,23 @@ impl TextRenderer {
) -> anyhow::Result<()> {
let mut buffers = Vec::new();
let mut buffer = glyphon::Buffer::new(
&mut self.font_system,
glyphon::Metrics {
font_size: 16.,
line_height: 16.,
},
);
buffer.set_text(
&mut self.font_system,
"Hello, world!",
glyphon::Attrs::new(),
glyphon::Shaping::Advanced,
);
for op in &_operations.operations {
let mut buffer = glyphon::Buffer::new(
&mut self.font_system,
glyphon::Metrics {
font_size: 16.,
line_height: 16.,
},
);
buffer.set_text(
&mut self.font_system,
&format!("{op}"),
glyphon::Attrs::new(),
glyphon::Shaping::Advanced,
);
buffers.push(buffer);
buffers.push(buffer);
}
let text_areas = buffers.iter().map(|buffer| glyphon::TextArea {
buffer,