Skip to content

Commit fc70817

Browse files
Fixed the white square in debug mode being at the wrong y
I mean the white square in the editor btw.
1 parent 9dfd63c commit fc70817

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,9 +1987,10 @@ async fn main() {
19871987
&font
19881988
);
19891989

1990+
let correct_snapped_y = (screen_height() / 1.15 - 25.0) + (snapped_y as f32 - 500.0) as f32;
19901991
draw_rectangle_lines(
19911992
snapped_x as f32 - cam_pos_x * 5.0,
1992-
snapped_y as f32 + cam_pos_y * 5.0,
1993+
correct_snapped_y + cam_pos_y * 5.0,
19931994
grid_size as f32,
19941995
grid_size as f32,
19951996
2.0,

0 commit comments

Comments
 (0)