diff --git a/docs/design/notes/gui.md b/docs/design/notes/gui.md index 4e0518b317..2057a18a24 100644 --- a/docs/design/notes/gui.md +++ b/docs/design/notes/gui.md @@ -590,5 +590,5 @@ Plugin styles are blocking or ambient. And some can conflict... - can we somehow fold PluginsPerMap into PerMapUI? :D different API that doesnt blindly pass in all of primary field - Layers could be stackable modal too, but do that later. low-pri. - probably dont need all those methods in UIState. just a way to get the main state. -- bulk-disable debug mode stuff in tutorial land. should be easy now! - dont recreate PluginCtx so many times? changing plugin API or something should help. +- bulk-disable debug mode stuff in tutorial land. should be easy now! diff --git a/editor/src/render/intersection.rs b/editor/src/render/intersection.rs index 104dc9797e..def68fd8f7 100644 --- a/editor/src/render/intersection.rs +++ b/editor/src/render/intersection.rs @@ -63,7 +63,7 @@ impl Renderable for DrawIntersection { }); g.draw_polygon(color, &self.polygon); - if opts.cam_zoom >= MIN_ZOOM_FOR_MARKINGS { + if ctx.canvas.cam_zoom >= MIN_ZOOM_FOR_MARKINGS { for corner in &self.sidewalk_corners { g.draw_polygon(ctx.cs.get_def("sidewalk corner", Color::grey(0.7)), corner); } diff --git a/editor/src/render/lane.rs b/editor/src/render/lane.rs index c0de16b2aa..4c8eb3dc78 100644 --- a/editor/src/render/lane.rs +++ b/editor/src/render/lane.rs @@ -117,7 +117,7 @@ impl Renderable for DrawLane { }); g.draw_polygon(color, &self.polygon); - if opts.cam_zoom >= MIN_ZOOM_FOR_MARKINGS { + if ctx.canvas.cam_zoom >= MIN_ZOOM_FOR_MARKINGS { for m in &self.markings { m(g, ctx.cs); } diff --git a/editor/src/render/mod.rs b/editor/src/render/mod.rs index d531f0a0c8..48fb3e8298 100644 --- a/editor/src/render/mod.rs +++ b/editor/src/render/mod.rs @@ -54,7 +54,6 @@ pub struct RenderOptions { // The "main" color for the object, if available. pub color: Option, // TODO This should be accessible through ctx... - pub cam_zoom: f64, pub debug_mode: bool, pub is_selected: bool, } diff --git a/editor/src/ui.rs b/editor/src/ui.rs index ed3106cf7a..0fd567c424 100644 --- a/editor/src/ui.rs +++ b/editor/src/ui.rs @@ -238,7 +238,6 @@ impl GUI for UI { { let opts = RenderOptions { color: self.color_obj(obj.get_id(), &ctx), - cam_zoom: self.canvas.cam_zoom, debug_mode: self.state.is_debug_mode_enabled(), is_selected: self.state.is_current_selection(obj.get_id()), };