aboutsummaryrefslogtreecommitdiff
path: root/src/tool/wall_tool.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool/wall_tool.rs')
-rw-r--r--src/tool/wall_tool.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tool/wall_tool.rs b/src/tool/wall_tool.rs
index 715a8b9..35b2458 100644
--- a/src/tool/wall_tool.rs
+++ b/src/tool/wall_tool.rs
@@ -11,7 +11,7 @@ use raylib::RaylibHandle;
pub struct WallTool {
keybindings: WallToolKeybindings,
- unfinished_wall: Option<(Vec2<f32>, Vec2<f32>)>,
+ unfinished_wall: Option<(Vec2<f64>, Vec2<f64>)>,
}
impl WallTool {
@@ -35,7 +35,7 @@ impl Tool for WallTool {
transform: &Transform,
mouse_blocked: bool,
) {
- let mouse_pos_m = transform.point_px_to_m(rl.get_mouse_position().into());
+ let mouse_pos_m = transform.point_px_to_m(&rl.get_mouse_position().into());
if let Some((_, ref mut pos2)) = &mut self.unfinished_wall {
*pos2 = snap_to_grid(mouse_pos_m, SNAP_SIZE);
}
@@ -103,12 +103,12 @@ impl Tool for WallTool {
}
if let Some((pos1, pos2)) = self.unfinished_wall {
- let pos1: Vector2 = transform.point_m_to_px(pos1).into();
- let pos2: Vector2 = transform.point_m_to_px(pos2).into();
+ let pos1: Vector2 = transform.point_m_to_px(&pos1).into();
+ let pos2: Vector2 = transform.point_m_to_px(&pos2).into();
rld.draw_line_ex(
pos1,
pos2,
- transform.length_m_to_px(0.1),
+ transform.length_m_to_px(0.1) as f32,
Color {
r: 150,
g: 200,