aboutsummaryrefslogtreecommitdiff
path: root/src/map/mod.rs
diff options
context:
space:
mode:
authorArne Dußin2020-12-16 13:34:56 +0100
committerArne Dußin2020-12-16 13:34:56 +0100
commit82d11b7d3e15d8175accf7579db1fbe528fc6583 (patch)
treebe9a5601e99608966d4ccd146c3bfb3a70c7fc02 /src/map/mod.rs
parent9799d3c6a8f0c242668203a1c70d7b6cfed3e855 (diff)
downloadgraf_karto-82d11b7d3e15d8175accf7579db1fbe528fc6583.tar.gz
graf_karto-82d11b7d3e15d8175accf7579db1fbe528fc6583.zip
Add constant for default colours and selection tool
Diffstat (limited to 'src/map/mod.rs')
-rw-r--r--src/map/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/mod.rs b/src/map/mod.rs
index 93f51a2..ff03474 100644
--- a/src/map/mod.rs
+++ b/src/map/mod.rs
@@ -75,7 +75,7 @@ impl Map {
}
pub fn draw(&self, rld: &mut RaylibDrawHandle, transform: &Transform) {
- for element in self.iter() {
+ for element in self.elements() {
element.draw(rld, transform);
}
}
@@ -98,7 +98,7 @@ impl Map {
/// Iterator over all elements as objects when an operation needs to go over all elements of the
/// map.
- pub fn iter(&self) -> impl Iterator<Item = &dyn Mappable> {
+ pub fn elements(&self) -> impl Iterator<Item = &dyn Mappable> {
self.rect_rooms
.iter()
.map(|r| r as &dyn Mappable)
@@ -107,7 +107,7 @@ impl Map {
.chain(self.icons.iter().map(|i| i as &dyn Mappable))
}
- pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut dyn Mappable> {
+ pub fn elements_mut(&mut self) -> impl Iterator<Item = &mut dyn Mappable> {
self.rect_rooms
.iter_mut()
.map(|r| r as &mut dyn Mappable)