diff --git a/editor/src/render/lane.rs b/editor/src/render/lane.rs index b8e6f7c5d4..ac94b4e079 100644 --- a/editor/src/render/lane.rs +++ b/editor/src/render/lane.rs @@ -91,7 +91,7 @@ impl DrawLane { g.draw_polygon(color, &self.polygon); } - pub fn draw_detail(&self, g: &mut GfxCtx, canvas: &Canvas, cs: &ColorScheme) { + pub fn draw_detail(&self, g: &mut GfxCtx, cs: &ColorScheme) { for m in &self.markings { let line = if m.round { graphics::Line::new_round(cs.get(m.color), m.thickness) @@ -102,14 +102,15 @@ impl DrawLane { g.draw_line(&line, *pts); } } - - // TODO move to draw_debug - for pt in &self.draw_id_at { - canvas.draw_text_at(g, &vec![format!("{}", self.id.0)], pt.x(), pt.y()); - } } - pub fn draw_debug(&self, g: &mut GfxCtx, cs: &ColorScheme, l: &map_model::Lane) { + pub fn draw_debug( + &self, + g: &mut GfxCtx, + canvas: &Canvas, + cs: &ColorScheme, + l: &map_model::Lane, + ) { let line = graphics::Line::new_round(cs.get(Colors::Debug), PARCEL_BOUNDARY_THICKNESS / 2.0); let circle_color = cs.get(Colors::BrightDebug); @@ -120,6 +121,10 @@ impl DrawLane { g.draw_ellipse(circle_color, geometry::make_circle(pt1, 0.4)); g.draw_ellipse(circle_color, geometry::make_circle(pt2, 0.8)); } + + for pt in &self.draw_id_at { + canvas.draw_text_at(g, &vec![format!("{}", self.id.0)], pt.x(), pt.y()); + } } pub fn get_bbox_for_lane(&self) -> Rect { diff --git a/editor/src/ui.rs b/editor/src/ui.rs index 38e7de06a9..164eb6bbd5 100644 --- a/editor/src/ui.rs +++ b/editor/src/ui.rs @@ -649,10 +649,10 @@ impl gui::GUI for UI { for l in &lanes_onscreen { l.draw(g, self.color_lane(l.id)); if self.canvas.cam_zoom >= MIN_ZOOM_FOR_LANE_MARKERS { - l.draw_detail(g, &self.canvas, &self.cs); + l.draw_detail(g, &self.cs); } if self.debug_mode.is_enabled() { - l.draw_debug(g, &self.cs, self.map.get_l(l.id)); + l.draw_debug(g, &self.canvas, &self.cs, self.map.get_l(l.id)); } }