aboutsummaryrefslogtreecommitdiff
path: root/src/tool/room_tool.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool/room_tool.rs')
-rw-r--r--src/tool/room_tool.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/tool/room_tool.rs b/src/tool/room_tool.rs
index 6a9ad55..10b9edf 100644
--- a/src/tool/room_tool.rs
+++ b/src/tool/room_tool.rs
@@ -1,7 +1,7 @@
use super::Tool;
use crate::math;
use crate::transform::Transform;
-use raylib::core::drawing::RaylibDraw;
+use raylib::core::drawing::{RaylibDraw, RaylibDrawHandle};
use raylib::ffi::{Color, MouseButton};
use raylib::math::{Rectangle, Vector2};
use raylib::RaylibHandle;
@@ -25,7 +25,7 @@ impl RoomTool {
}
impl Tool for RoomTool {
- fn update(&mut self, rl: &RaylibHandle, transform: &Transform) {
+ fn active_update(&mut self, rl: &RaylibHandle, transform: &Transform) {
let mouse_pos_m = transform.point_px_to_m(rl.get_mouse_position());
// Update the currently drawn rectangle, if it exists
if let Some((_, ref mut pos2)) = &mut self.unfinished_rect {
@@ -56,10 +56,7 @@ impl Tool for RoomTool {
}
}
- fn draw<D>(&self, rld: &mut D, transform: &Transform)
- where
- D: RaylibDraw,
- {
+ fn draw(&self, rld: &mut RaylibDrawHandle, transform: &Transform) {
// Draw all finished rectangles.
for &rect in &self.room_rects {
rld.draw_rectangle_rec(