From d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Mon, 21 Dec 2020 01:22:15 +0100 Subject: Add previously missing docs where appropriate --- src/tool/polygon_room_tool.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/tool/polygon_room_tool.rs') diff --git a/src/tool/polygon_room_tool.rs b/src/tool/polygon_room_tool.rs index de6714d..33daaf5 100644 --- a/src/tool/polygon_room_tool.rs +++ b/src/tool/polygon_room_tool.rs @@ -1,3 +1,5 @@ +//! Tool to create rooms in the shape of generic polygons. + use super::Tool; use crate::colours::DEFAULT_COLOURS; use crate::map::Map; @@ -10,6 +12,7 @@ struct UnfinishedPolygon { pub working_corner: Vec2, } +/// The tool itself. pub struct PolygonRoomTool { unfinished_polygon: Option, } @@ -76,6 +79,8 @@ impl UnfinishedPolygon { } impl PolygonRoomTool { + /// Create a new polygon room tool. There should be only one instance and it should be created + /// in the editor. pub fn new() -> Self { Self { unfinished_polygon: None, -- cgit v1.2.3-70-g09d2