egui: restore drawing yellow dots at routing source and target

This commit is contained in:
Mikolaj Wielgus 2024-07-01 14:09:17 +02:00
parent edf81feccc
commit 03f996721d
1 changed files with 21 additions and 17 deletions

View File

@ -196,24 +196,28 @@ impl Viewport {
/*for ghost in shared_data.ghosts.iter() {
painter.paint_primitive(&ghost, egui::Color32::from_rgb(75, 75, 150));
}
if let (Some(from), Some(to)) = (shared_data.from, shared_data.to) {
painter.paint_dot(
Circle {
pos: board.layout().drawing().primitive(from).shape().center(),
r: 20.0,
},
egui::Color32::from_rgb(255, 255, 100),
);
painter.paint_dot(
Circle {
pos: board.layout().drawing().primitive(to).shape().center(),
r: 20.0,
},
egui::Color32::from_rgb(255, 255, 100),
);
}*/
if let Some(execute) = maybe_execute {
if let Some(navmesh) = execute.maybe_navmesh() {
if let (from, to) = (navmesh.source(), navmesh.target()) {
painter.paint_dot(
Circle {
pos: board.layout().drawing().primitive(from).shape().center(),
r: 60.0,
},
egui::Color32::from_rgb(255, 255, 100),
);
painter.paint_dot(
Circle {
pos: board.layout().drawing().primitive(to).shape().center(),
r: 60.0,
},
egui::Color32::from_rgb(255, 255, 100),
);
}
}
}
}
}