Skip to content
Snippets Groups Projects
Unverified Commit f3999d01 authored by Eldred Habert's avatar Eldred Habert Committed by GitHub
Browse files

Implement Display for Orientation

So that it can be more easily displayed to the user if needed
parent a720d46f
No related branches found
No related tags found
No related merge requests found
...@@ -337,6 +337,17 @@ impl FromStr for Orientation { ...@@ -337,6 +337,17 @@ impl FromStr for Orientation {
} }
} }
impl Display for Orientation {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Orientation::Orthogonal => write!(f, "orthogonal"),
Orientation::Isometric => write!(f, "isometric"),
Orientation::Staggered => write!(f, "staggered"),
Orientation::Hexagonal => write!(f, "hexagonal"),
}
}
}
/// A tileset, usually the tilesheet image. /// A tileset, usually the tilesheet image.
#[derive(Debug, PartialEq, Clone)] #[derive(Debug, PartialEq, Clone)]
pub struct Tileset { pub struct Tileset {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment