diff options
| author | Arne Dußin | 2020-12-16 13:34:56 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-12-16 13:34:56 +0100 |
| commit | 82d11b7d3e15d8175accf7579db1fbe528fc6583 (patch) | |
| tree | be9a5601e99608966d4ccd146c3bfb3a70c7fc02 /src/tool/deletion_tool.rs | |
| parent | 9799d3c6a8f0c242668203a1c70d7b6cfed3e855 (diff) | |
| download | graf_karto-82d11b7d3e15d8175accf7579db1fbe528fc6583.tar.gz graf_karto-82d11b7d3e15d8175accf7579db1fbe528fc6583.zip | |
Add constant for default colours and selection tool
Diffstat (limited to 'src/tool/deletion_tool.rs')
| -rw-r--r-- | src/tool/deletion_tool.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/tool/deletion_tool.rs b/src/tool/deletion_tool.rs index ad3af1d..5ff3e6a 100644 --- a/src/tool/deletion_tool.rs +++ b/src/tool/deletion_tool.rs @@ -2,8 +2,8 @@ use super::Tool; use crate::map::Map; use crate::math::{Rect, Surface, Vec2}; use crate::transform::Transform; +use crate::colours::DEFAULT_COLOURS; use raylib::core::drawing::{RaylibDraw, RaylibDrawHandle}; -use raylib::ffi::Color; pub struct DeletionTool { deletion_rect: Option<(Vec2<f64>, Vec2<f64>)>, @@ -38,22 +38,12 @@ impl Tool for DeletionTool { let rect_px = transform.rect_m_to_px(&Rect::bounding_rect(pos1, pos2)); rld.draw_rectangle_rec( rect_px, - Color { - r: 200, - g: 150, - b: 150, - a: 50, - }, + DEFAULT_COLOURS.deletion_rect ); rld.draw_rectangle_lines_ex( rect_px, 4, - Color { - r: 200, - g: 150, - b: 150, - a: 150, - }, + DEFAULT_COLOURS.deletion_rect_outline ); } } |
