diff --git a/POLISH.md b/POLISH.md new file mode 100644 index 0000000000..03163039b2 --- /dev/null +++ b/POLISH.md @@ -0,0 +1,15 @@ +# Polish + +Overlapping with TODO.md and docs/backlog.md, we have... a new list of visible +things needing polish! + +- sometimes UI zooms in at once, then unzooms slowly +- sidewalk paths start in building centers and end in sidewalk centers + - this is probably fine to show agents moving, but at least draw + building layer before sidewalk layer +- the colors are awful +- different lane markings + - sidewalks with little horizontal lines + - parking with... circled P's and maybe partial horizontal lines to + show spots? + - copy the green Seattle color scheme for bike lanes diff --git a/TODO.md b/TODO.md index ad5bc6bd18..b5f4b24ee4 100644 --- a/TODO.md +++ b/TODO.md @@ -71,7 +71,6 @@ - line type / ditch vec2d / settle on types - one-at-a-time UI plugins - - UI plugins track their own active state - UI colors in one place - cleaner pipeline of map construction diff --git a/editor/src/ui.rs b/editor/src/ui.rs index 28ca25a928..21ffde483e 100644 --- a/editor/src/ui.rs +++ b/editor/src/ui.rs @@ -131,15 +131,8 @@ impl UI { } } - // TODO or make a custom event for zoom change - let old_zoom = -1.0; let new_zoom = ui.canvas.cam_zoom; - ui.show_roads.handle_zoom(old_zoom, new_zoom); - ui.show_buildings.handle_zoom(old_zoom, new_zoom); - ui.show_intersections.handle_zoom(old_zoom, new_zoom); - ui.show_parcels.handle_zoom(old_zoom, new_zoom); - ui.show_icons.handle_zoom(old_zoom, new_zoom); - ui.debug_mode.handle_zoom(old_zoom, new_zoom); + ui.zoom_for_toggleable_layers(-1.0, new_zoom); ui } @@ -199,13 +192,7 @@ impl UI { let old_zoom = self.canvas.cam_zoom; self.canvas.handle_event(input.use_event_directly()); let new_zoom = self.canvas.cam_zoom; - - self.show_roads.handle_zoom(old_zoom, new_zoom); - self.show_buildings.handle_zoom(old_zoom, new_zoom); - self.show_intersections.handle_zoom(old_zoom, new_zoom); - self.show_parcels.handle_zoom(old_zoom, new_zoom); - self.show_icons.handle_zoom(old_zoom, new_zoom); - self.debug_mode.handle_zoom(old_zoom, new_zoom); + self.zoom_for_toggleable_layers(old_zoom, new_zoom); if !edit_mode { if self.show_roads.handle_event(input) { @@ -399,6 +386,16 @@ impl UI { self.canvas.draw_osd_notification(g, &osd_lines); } + // TODO or make a custom event for zoom change + fn zoom_for_toggleable_layers(&mut self, old_zoom: f64, new_zoom: f64) { + self.show_roads.handle_zoom(old_zoom, new_zoom); + self.show_buildings.handle_zoom(old_zoom, new_zoom); + self.show_intersections.handle_zoom(old_zoom, new_zoom); + self.show_parcels.handle_zoom(old_zoom, new_zoom); + self.show_icons.handle_zoom(old_zoom, new_zoom); + self.debug_mode.handle_zoom(old_zoom, new_zoom); + } + fn mouseover_something(&self, window_size: &Size) -> Option { let (x, y) = self.canvas.get_cursor_in_map_space();