Compare commits
No commits in common. "46f8831c7b4b810d2387969dfe71b5d80627ef85" and "1bbfaceeb47c6a1e0e8c07b0859fe35479d0ec5a" have entirely different histories.
46f8831c7b
...
1bbfaceeb4
|
@ -27,7 +27,6 @@ pub enum Error {
|
|||
Dialogue,
|
||||
Ending,
|
||||
Exit,
|
||||
Font,
|
||||
Game {
|
||||
missing: NotFound,
|
||||
},
|
||||
|
|
|
@ -51,7 +51,9 @@ impl Sprite {
|
|||
format!("\n{}", lines.join("\n"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Sprite {
|
||||
pub fn from_str(str: &str) -> Result<Sprite, crate::Error> {
|
||||
let mut lines: Vec<&str> = str.lines().collect();
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ impl Font {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn to_string(&self) -> Result<String, crate::Error> {
|
||||
pub(crate) fn to_string(&self) -> Result<String, &'static str> {
|
||||
match &self {
|
||||
Font::UnicodeEuropeanSmall => Ok("unicode_european_small".to_string()),
|
||||
Font::UnicodeEuropeanLarge => Ok("unicode_european_large".to_string()),
|
||||
Font::UnicodeAsian => Ok("unicode_asian".to_string()),
|
||||
Font::Arabic => Ok("arabic".to_string()),
|
||||
_ => Err(crate::Error::Font),
|
||||
_ => Err("No string available for this Font"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue