Display edges on the egui version
This commit is contained in:
parent
fb1daa4912
commit
cbfa1d009b
@ -99,9 +99,17 @@ impl BoardBuilderApp {
|
|||||||
view.from_coords(node.x, node.y),
|
view.from_coords(node.x, node.y),
|
||||||
Align2::CENTER_CENTER,
|
Align2::CENTER_CENTER,
|
||||||
&node.name,
|
&node.name,
|
||||||
FontId::proportional(12.0),
|
FontId::proportional(16.0),
|
||||||
Color32::BLACK,
|
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,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user