From 1b5f06e902b9e5c5b0d5897fc981eeaa6dc39b37 Mon Sep 17 00:00:00 2001 From: tom barrett Date: Mon, 1 Jul 2019 09:24:59 -0500 Subject: invisible property now works --- src/tileset.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/tileset.rs') diff --git a/src/tileset.rs b/src/tileset.rs index dcd5e9a..df7045d 100644 --- a/src/tileset.rs +++ b/src/tileset.rs @@ -57,6 +57,16 @@ impl Tileset { properties.push(Property::new(tile_id, property_elements)); } + let invisible: Vec = properties + .iter() + .filter(|p| p.visible == Some(false)) + .map(|p| p.tile_id) + .collect(); + + for i in invisible { + *tiles.get_mut(&i).unwrap() = Rect::zero(); + } + Tileset { tiles, properties } } -- cgit v1.2.3