From 4579d5cb376fdcc58c70d9d7ea8a5064d686ec1d Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Sat, 31 Oct 2020 01:36:58 +0100 Subject: Add wall tool The wall tool is currently just one pixels lines, which must be changed in the future, of course, but this is also to test changing between tools. --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 3f36123..723a1fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,12 +6,12 @@ pub mod transform; pub use transform::Transform; use raylib::prelude::*; -use tool::{RoomTool, Tool}; +use tool::{Tool, ToolShed}; fn main() { let (mut rl, thread) = raylib::init().resizable().title("Hello there!").build(); - let mut current_tool = RoomTool::new(); + let mut tool_shed = ToolShed::new(); let mut transform = Transform::new(); let mut last_mouse_pos = rl.get_mouse_position(); @@ -31,7 +31,7 @@ fn main() { transform.try_zoom_out(); } - current_tool.update(&rl, &transform); + tool_shed.update(&rl, &transform); // Update the last mouse position last_mouse_pos = rl.get_mouse_position(); @@ -42,7 +42,7 @@ fn main() { d.clear_background(Color::BLACK); grid::draw_grid(&mut d, screen_width, screen_height, &transform); - current_tool.draw(&mut d, &transform); + tool_shed.draw_tools(&mut d, &transform); } } } -- cgit v1.2.3-70-g09d2