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/gui/dimension_indicator.rs | |
| parent | 48f321a80970ebeb8374072b1d2e0a4d297aa348 (diff) | |
| download | graf_karto-d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4.tar.gz graf_karto-d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4.zip | |
Add previously missing docs where appropriate
Diffstat (limited to 'src/gui/dimension_indicator.rs')
| -rw-r--r-- | src/gui/dimension_indicator.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/dimension_indicator.rs b/src/gui/dimension_indicator.rs index aa00f67..e8848fe 100644 --- a/src/gui/dimension_indicator.rs +++ b/src/gui/dimension_indicator.rs @@ -1,10 +1,13 @@ +//! An interface element that shows the size of the selected map items and provides a means to +//! manually change the size of them in a precise manner should need be. + use crate::colours::DEFAULT_COLOURS; use crate::map::Map; use crate::math::{self, Rect, Vec2}; use crate::transform::Transform; use nalgebra::{Matrix3, Vector2}; use raylib::drawing::RaylibDraw; -use raylib::ffi::{Color, KeyboardKey}; +use raylib::ffi::KeyboardKey; use raylib::RaylibHandle; /// A state the [DimensionIndicator] is currently in. This determines the behaviour of it and what @@ -218,6 +221,7 @@ impl DimensionIndicator { self.bounds = bounds; } + /// Draw the dimensions detected on the current selection. pub fn draw(&self, rld: &mut impl RaylibDraw, transform: &Transform) { /* Ignore a selection that has no non-null dimensions, since this usually * indicates that there is nothing to be scaled. |
