Add address/business search to 15m. #393

This commit is contained in:
Dustin Carlino 2021-01-08 15:55:13 -08:00
parent fea3ebbe5b
commit 64d5f487b1

View File

@ -6,7 +6,7 @@
use abstutil::prettyprint_usize;
use geom::{Distance, Duration};
use map_gui::tools::{nice_map_name, open_browser, CityPicker, ColorLegend, PopupMsg};
use map_gui::tools::{nice_map_name, open_browser, CityPicker, ColorLegend, Navigator, PopupMsg};
use map_gui::ID;
use map_model::connectivity::WalkingOptions;
use map_model::{AmenityType, Building, BuildingID, LaneType};
@ -152,6 +152,9 @@ impl State<App> for Viewer {
],
));
}
"search" => {
return Transition::Push(Navigator::new(ctx, app));
}
"Find your perfect home" => {
return Transition::Push(FindHome::new(ctx, self.isochrone.options.clone()));
}
@ -325,7 +328,10 @@ fn build_panel(ctx: &mut EventCtx, app: &App, start: &Building, isochrone: &Isoc
rows.push(options_to_controls(ctx, &isochrone.options));
rows.push(Btn::text_bg1("Find your perfect home").build_def(ctx, None));
rows.push(Btn::plaintext("About").build_def(ctx, None));
rows.push(Widget::row(vec![
Btn::plaintext("About").build_def(ctx, None),
Btn::svg_def("system/assets/tools/search.svg").build(ctx, "search", lctrl(Key::F)),
]));
Panel::new(Widget::col(rows))
.aligned(HorizontalAlignment::Right, VerticalAlignment::Top)