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.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tool/room_tool.rs b/src/tool/room_tool.rs
index c4a8b8c..6a283e3 100644
--- a/src/tool/room_tool.rs
+++ b/src/tool/room_tool.rs
@@ -14,7 +14,7 @@ pub struct RoomTool {
keybindings: RoomToolKeybindings,
/// The rectangle that is currently being drawn by the user. Once it is finished, it will be
/// pushed into the room_rects.
- unfinished_rect: Option<(Vec2<f32>, Vec2<f32>)>,
+ unfinished_rect: Option<(Vec2<f64>, Vec2<f64>)>,
dimension_indicator: DimensionIndicator,
}
@@ -42,7 +42,7 @@ impl Tool for RoomTool {
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());
// Update the currently drawn rectangle, if it exists, and also its dimension indicator.
if let Some((ref pos1, ref mut pos2)) = &mut self.unfinished_rect {
*pos2 = snap_to_grid(mouse_pos_m, SNAP_SIZE);
@@ -71,7 +71,7 @@ impl Tool for RoomTool {
// Draw all finished rectangles.
for &rect in map_data.rooms() {
rld.draw_rectangle_rec(
- transform.rect_m_to_px(rect),
+ transform.rect_m_to_px(&rect),
Color {
r: 180,
g: 180,
@@ -84,7 +84,7 @@ impl Tool for RoomTool {
// Do the same for the unfinished rectangle
if let Some((pos1, pos2)) = self.unfinished_rect {
rld.draw_rectangle_rec(
- transform.rect_m_to_px(Rect::bounding_rect(pos1, pos2)),
+ transform.rect_m_to_px(&Rect::bounding_rect(pos1, pos2)),
Color {
r: 150,
g: 200,