Expose zoom_level

This commit is contained in:
Maximilian Ammann 2022-04-04 12:27:02 +02:00
parent a447084674
commit dbf14b97e6

View File

@ -385,6 +385,10 @@ impl ViewRegion {
}
}
pub fn zoom_level(&self) -> u8 {
self.z
}
pub fn is_in_view(&self, &world_coords: &WorldTileCoords) -> bool {
world_coords.x <= self.max_tile.x + self.padding
&& world_coords.y <= self.max_tile.y + self.padding