pub struct SheetCharacter { /* private fields */ }Expand description
Sheets per activity (<activity>.json) plus the shared _base sheet. Any
activity without art falls back to the placeholder, so missing art is never a
crash (PLAN.md section 7.1).
Implementations§
Source§impl SheetCharacter
impl SheetCharacter
Sourcepub fn from_sources(
sources: &[(&str, &str, &[u8])],
) -> Result<Self, Vec<String>>
pub fn from_sources( sources: &[(&str, &str, &[u8])], ) -> Result<Self, Vec<String>>
Parses (name, json, png) triples. Returns every error at once.
Sourcepub fn colors(&self) -> Vec<Rgb>
pub fn colors(&self) -> Vec<Rgb>
Every opaque colour the sheets use, in first-seen order (for the scene palette).
pub fn has_sheet(&self, activity: &str) -> bool
Sourcepub fn missing_art<'c>(&self, catalog: &'c Catalog) -> Vec<&'c str>
pub fn missing_art<'c>(&self, catalog: &'c Catalog) -> Vec<&'c str>
Activities still drawn with the placeholder.
Trait Implementations§
Source§impl Character for SheetCharacter
impl Character for SheetCharacter
Source§impl Clone for SheetCharacter
impl Clone for SheetCharacter
Auto Trait Implementations§
impl Forget for SheetCharacter
impl Freeze for SheetCharacter
impl Move for SheetCharacter
impl RefUnwindSafe for SheetCharacter
impl Send for SheetCharacter
impl Sync for SheetCharacter
impl Unpin for SheetCharacter
impl UnsafeUnpin for SheetCharacter
impl UnwindSafe for SheetCharacter
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