rename get_rect to to_rect, and there is scrolling!

This commit is contained in:
2015-01-06 18:16:33 +01:00
parent db4b16c08d
commit b5f94170f7
4 changed files with 56 additions and 25 deletions

View File

@@ -62,4 +62,8 @@ impl<T> Layer<T> where T: Clone {
}
}
}
pub fn to_rect(&self) -> Rect {
Rect::new(0, 0, self.width * self.tile_width, self.height * self.tile_height)
}
}