Display edges on the egui version

This commit is contained in:
Dane Johnson 2022-05-09 16:44:45 -05:00
parent fb1daa4912
commit cbfa1d009b

View File

@ -99,9 +99,17 @@ impl BoardBuilderApp {
view.from_coords(node.x, node.y),
Align2::CENTER_CENTER,
&node.name,
FontId::proportional(12.0),
FontId::proportional(16.0),
Color32::BLACK,
);
let stroke = Stroke { width: 1.0, color: Color32::BLACK };
for edge in &node.edges {
let other_node = &self.board.nodes[edge];
painter.line_segment(
[view.from_coords(node.x, node.y), view.from_coords(other_node.x, other_node.y)],
stroke,
);
}
}
}
}