mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-27 16:36:02 +03:00
show sidewalk corners when zoomed out
This commit is contained in:
parent
4ca6571e2f
commit
ae6438e8b7
@ -13,6 +13,7 @@
|
||||
- what's correct for 14th and e boston? if we had less lanes there, would it help?
|
||||
|
||||
- make the polygons for the merged intersections look better
|
||||
- the thick road bands for tiny roads totally vanish... is that good?
|
||||
- same for the sidewalk corners
|
||||
- make sure the turns are reasonable
|
||||
- apply the merge automatically somehow
|
||||
|
@ -70,18 +70,21 @@ impl Renderable for DrawIntersection {
|
||||
ctx.canvas
|
||||
.draw_text_at(g, Text::from_line(format!("{}", idx + 1)), *pt);
|
||||
}
|
||||
} else if ctx.canvas.cam_zoom >= MIN_ZOOM_FOR_MARKINGS || opts.show_all_detail {
|
||||
} else {
|
||||
// Always draw these; otherwise zooming in is very disconcerting.
|
||||
for corner in &self.sidewalk_corners {
|
||||
g.draw_polygon(opts.color.unwrap_or_else(|| ctx.cs.get("sidewalk")), corner);
|
||||
}
|
||||
|
||||
if self.intersection_type == IntersectionType::TrafficSignal {
|
||||
if ctx.hints.suppress_traffic_signal_details != Some(self.id) {
|
||||
self.draw_traffic_signal(g, ctx);
|
||||
}
|
||||
} else {
|
||||
for crosswalk in &self.crosswalks {
|
||||
crosswalk.draw(g, ctx.cs.get_def("crosswalk", Color::WHITE));
|
||||
if ctx.canvas.cam_zoom >= MIN_ZOOM_FOR_MARKINGS || opts.show_all_detail {
|
||||
if self.intersection_type == IntersectionType::TrafficSignal {
|
||||
if ctx.hints.suppress_traffic_signal_details != Some(self.id) {
|
||||
self.draw_traffic_signal(g, ctx);
|
||||
}
|
||||
} else {
|
||||
for crosswalk in &self.crosswalks {
|
||||
crosswalk.draw(g, ctx.cs.get_def("crosswalk", Color::WHITE));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user