From 82d11b7d3e15d8175accf7579db1fbe528fc6583 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Wed, 16 Dec 2020 13:34:56 +0100 Subject: Add constant for default colours and selection tool --- src/tool/rect_room_tool.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/tool/rect_room_tool.rs') diff --git a/src/tool/rect_room_tool.rs b/src/tool/rect_room_tool.rs index 3eb40aa..dfda495 100644 --- a/src/tool/rect_room_tool.rs +++ b/src/tool/rect_room_tool.rs @@ -2,8 +2,8 @@ use super::Tool; use crate::map::Map; use crate::math::{Rect, Vec2}; use crate::transform::Transform; +use crate::colours::DEFAULT_COLOURS; use raylib::core::drawing::{RaylibDraw, RaylibDrawHandle}; -use raylib::ffi::Color; pub struct RectRoomTool { /// The rectangle that is currently being drawn by the user. Once it is finished, it will be @@ -35,12 +35,7 @@ impl Tool for RectRoomTool { if let Some((pos1, pos2)) = self.unfinished_rect { rld.draw_rectangle_rec( transform.rect_m_to_px(&Rect::bounding_rect(pos1, pos2)), - Color { - r: 150, - g: 200, - b: 150, - a: 255, - }, + DEFAULT_COLOURS.room_selected ); } } -- cgit v1.2.3-70-g09d2