diff options
| author | Arne Dußin | 2020-12-21 01:22:15 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-12-21 21:15:55 +0100 |
| commit | d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4 (patch) | |
| tree | e5633f4d3b18472922c943d759e9f58722ba4405 /src/tool/rect_room_tool.rs | |
| parent | 48f321a80970ebeb8374072b1d2e0a4d297aa348 (diff) | |
| download | graf_karto-d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4.tar.gz graf_karto-d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4.zip | |
Add previously missing docs where appropriate
Diffstat (limited to 'src/tool/rect_room_tool.rs')
| -rw-r--r-- | src/tool/rect_room_tool.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tool/rect_room_tool.rs b/src/tool/rect_room_tool.rs index 29173cd..7cb85bb 100644 --- a/src/tool/rect_room_tool.rs +++ b/src/tool/rect_room_tool.rs @@ -1,3 +1,7 @@ +//! The rectangle room tool is a specialised tool to create rooms of rectangular shape and with the +//! sides of the room parallel to the x and y-axes. This is often useful, when a quick room creation +//! is necessary and the shape of the room does not have to be very special. + use super::Tool; use crate::colours::DEFAULT_COLOURS; use crate::map::Map; @@ -5,6 +9,7 @@ use crate::math::{Rect, Vec2}; use crate::transform::Transform; use raylib::core::drawing::{RaylibDraw, RaylibDrawHandle}; +/// The tool to create simple, rectangular rooms. pub struct RectRoomTool { /// The rectangle that is currently being drawn by the user. Once it is finished, it will be /// pushed into the room_rects. @@ -12,7 +17,8 @@ pub struct RectRoomTool { } impl RectRoomTool { - /// Create a new room tool where no rooms have been drawn yet. + /// Create a new room tool where no rooms have been drawn yet. Should be created only once per + /// program instance and by the editor. pub fn new() -> Self { Self { unfinished_rect: None, |
