Skip to content

Commit

Permalink
Add address/business search to 15m. #393
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Jan 8, 2021
1 parent fea3ebb commit 64d5f48
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fifteen_min/src/viewer.rs
Expand Up @@ -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};
Expand Down Expand Up @@ -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()));
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 64d5f48

Please sign in to comment.