mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 01:15:12 +03:00
Just put the road name in the tooltip!
This commit is contained in:
parent
159ae93f62
commit
34345ce341
@ -178,14 +178,16 @@ pub fn make_world(
|
||||
let mut world = World::bounded(map.get_bounds());
|
||||
|
||||
for r in &neighborhood.orig_perimeter.interior {
|
||||
let road = map.get_r(*r);
|
||||
world
|
||||
.add(FilterableObj::InteriorRoad(*r))
|
||||
.hitbox(map.get_r(*r).get_thick_polygon())
|
||||
.hitbox(road.get_thick_polygon())
|
||||
.drawn_in_master_batch()
|
||||
.hover_outline(Color::BLACK, Distance::meters(5.0))
|
||||
.tooltip(Text::from(format!(
|
||||
"{} rat-runs cross this street",
|
||||
rat_runs.count_per_road.get(*r)
|
||||
"{} rat-runs cross {}",
|
||||
rat_runs.count_per_road.get(*r),
|
||||
road.get_name(app.opts.language.as_ref()),
|
||||
)))
|
||||
.hotkey(lctrl(Key::D), "debug")
|
||||
.clickable()
|
||||
|
Loading…
Reference in New Issue
Block a user