diff --git a/assets/area_corner.png b/assets/area_corner.png deleted file mode 100644 index 15150fc..0000000 Binary files a/assets/area_corner.png and /dev/null differ diff --git a/assets/area_full.png b/assets/area_full.png index d5658a0..90b0f58 100644 Binary files a/assets/area_full.png and b/assets/area_full.png differ diff --git a/src/editor.rs b/src/editor.rs index aa62f90..a483f94 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -1084,18 +1084,16 @@ impl Editor { is_selecting: _, }) = self.active_tool { - let min = start.min(end); - let max = start.max(end); - let p_min = self.pos_to_screen(min.to_vec()); - let p_max = self.pos_to_screen(max.to_vec()); - let tex = textures.get("area_corner"); - d.draw_texture_ex(tex, p_min, 0., self.zoom, Color::WHITE); - let one_xy = Vector2::new(tile_size as f32, tile_size as f32); - d.draw_texture_ex(tex, p_max + one_xy, 180., self.zoom, Color::WHITE); - let top_right = Vector2::new(p_max.x + tile_size as f32, p_min.y); - d.draw_texture_ex(tex, top_right, 90., self.zoom, Color::WHITE); - let bot_left = Vector2::new(p_min.x, p_max.y + tile_size as f32); - d.draw_texture_ex(tex, bot_left, -90., self.zoom, Color::WHITE); + let p_min = self.pos_to_screen(start.min(end).to_vec()); + let p_max = self.pos_to_screen((start.max(end) + (1, 1).into()).to_vec()); + let x = p_min.x as i32; + let y = p_min.y as i32; + let width = p_max.x as i32 - x; + let height = p_max.y as i32 - y; + d.draw_rectangle(x, y, width, 4, Color::WHITE); + d.draw_rectangle(x, y + height - 4, width, 4, Color::WHITE); + d.draw_rectangle(x, y, 4, height, Color::WHITE); + d.draw_rectangle(x + width - 4, y, 4, height, Color::WHITE); } } }