diff options
| author | Arne Dußin | 2020-11-08 16:00:54 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-11-08 16:00:54 +0100 |
| commit | e08cb85528e6b72d5f3b2fbeb79b581fa7a4e461 (patch) | |
| tree | 15b443ce0aa82ae662a544523bd91633aafd011e /src/map_data.rs | |
| parent | c89592a9de3a9d21082952b8d90584d759ed7ef3 (diff) | |
| download | graf_karto-e08cb85528e6b72d5f3b2fbeb79b581fa7a4e461.tar.gz graf_karto-e08cb85528e6b72d5f3b2fbeb79b581fa7a4e461.zip | |
Make it so icons can rotate
Diffstat (limited to 'src/map_data.rs')
| -rw-r--r-- | src/map_data.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map_data.rs b/src/map_data.rs index fa3a389..8d0d926 100644 --- a/src/map_data.rs +++ b/src/map_data.rs @@ -1,4 +1,5 @@ use crate::math::{Rect, Vec2}; +use crate::tool::icon_tool::IconInfo; use ron::de::from_reader; use ron::ser::{to_string_pretty, PrettyConfig}; use serde::{Deserialize, Serialize}; @@ -13,7 +14,7 @@ use std::path::Path; pub struct MapData { rooms: Vec<Rect<f32>>, walls: Vec<(Vec2<f32>, Vec2<f32>)>, - icons: Vec<(usize, Vec2<f32>)>, + icons: Vec<IconInfo>, } impl MapData { @@ -76,10 +77,10 @@ impl MapData { &mut self.walls } - pub fn icons(&self) -> &Vec<(usize, Vec2<f32>)> { + pub fn icons(&self) -> &Vec<IconInfo> { &self.icons } - pub fn icons_mut(&mut self) -> &mut Vec<(usize, Vec2<f32>)> { + pub fn icons_mut(&mut self) -> &mut Vec<IconInfo> { &mut self.icons } } |
