aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorArne Dußin2020-10-31 01:36:58 +0100
committerArne Dußin2020-10-31 01:36:58 +0100
commit4579d5cb376fdcc58c70d9d7ea8a5064d686ec1d (patch)
tree98bb4b3415601348bffc1176d189264b01c1c558 /src/main.rs
parentc5b16dd0511997331b8cc8c3647fff95effbe8ec (diff)
downloadgraf_karto-4579d5cb376fdcc58c70d9d7ea8a5064d686ec1d.tar.gz
graf_karto-4579d5cb376fdcc58c70d9d7ea8a5064d686ec1d.zip
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.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
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);
}
}
}