Fix out by one in infinite scroll

This commit is contained in:
Gwilym Inzani 2024-03-06 15:42:48 +00:00
parent 75320ed3e0
commit 7ebebb2942

View file

@ -330,7 +330,7 @@ impl<'a> InfiniteScrolledMap<'a> {
new_tile_x new_tile_x
} else { } else {
// moving to the right, so need to update the right most position // moving to the right, so need to update the right most position
new_tile_x + 30 // TODO is this correct? new_tile_x + 31 // TODO is this correct?
}; };
Rect::new( Rect::new(
@ -355,7 +355,7 @@ impl<'a> InfiniteScrolledMap<'a> {
new_tile_y new_tile_y
} else { } else {
// moving down so need to update the bottom // moving down so need to update the bottom
new_tile_y + 20 // TODO is this correct? new_tile_y + 21 // TODO is this correct?
}; };
Rect::new( Rect::new(