mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 15:02:59 +03:00
Add road search tool to per-neighborhood states. #848
This commit is contained in:
parent
e0b6e94f26
commit
e3bdc086ac
@ -1,5 +1,5 @@
|
||||
use geom::Distance;
|
||||
use map_gui::tools::CityPicker;
|
||||
use map_gui::tools::{CityPicker, Navigator};
|
||||
use map_model::{IntersectionID, PathConstraints, RoadID};
|
||||
use widgetry::mapspace::{ObjectID, World, WorldOutcome};
|
||||
use widgetry::{
|
||||
@ -104,6 +104,9 @@ impl Tab {
|
||||
// dropdowns)
|
||||
self.switch_to_state(ctx, app, id)
|
||||
}
|
||||
"search" => {
|
||||
return Some(Transition::Push(Navigator::new_state(ctx, app)));
|
||||
}
|
||||
_ => {
|
||||
return None;
|
||||
}
|
||||
@ -142,6 +145,15 @@ impl Tab {
|
||||
.build_def(ctx),
|
||||
);
|
||||
}
|
||||
// Not exactly sure where to put this
|
||||
row.push(
|
||||
ctx.style()
|
||||
.btn_plain
|
||||
.icon("system/assets/tools/search.svg")
|
||||
.hotkey(Key::K)
|
||||
.build_widget(ctx, "search")
|
||||
.align_right(),
|
||||
);
|
||||
Widget::row(row)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user