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/gui/dimension_indicator.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui/dimension_indicator.rs') 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. -- cgit v1.2.3-70-g09d2