pub struct LevelMetaData {
pub title: String,
pub subtitle: Option<String>,
pub preview_loc: (u32, u32),
pub difficulty_rating: DifficultyRating,
}Expand description
Metadata for this level.
Controls stuff for how its shown on the level select menu.
Fields§
§title: StringTitle of the level
subtitle: Option<String>Subtitle appears after the normal title with a space and appears under the title when the level start card appears
preview_loc: (u32, u32)The location of the preview in tile coordinates on GFX.BMP
difficulty_rating: DifficultyRatingThe difficulty rating of the level
Implementations§
Source§impl LevelMetaData
impl LevelMetaData
Sourcepub fn from_lparse(
cnmb: &LParse,
cnms: &LParse,
version: &VersionSpecs,
ignore_warnings: bool,
) -> Result<Self, Error>
pub fn from_lparse( cnmb: &LParse, cnms: &LParse, version: &VersionSpecs, ignore_warnings: bool, ) -> Result<Self, Error>
Creates Level MetaData from an LParse file
Sourcepub fn get_full_title(&self) -> String
pub fn get_full_title(&self) -> String
Returns the full formated level title
Trait Implementations§
Source§impl Debug for LevelMetaData
impl Debug for LevelMetaData
Source§impl<'de> Deserialize<'de> for LevelMetaData
impl<'de> Deserialize<'de> for LevelMetaData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LevelMetaData
impl RefUnwindSafe for LevelMetaData
impl Send for LevelMetaData
impl Sync for LevelMetaData
impl Unpin for LevelMetaData
impl UnwindSafe for LevelMetaData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more