#[non_exhaustive]pub struct Look<'a> {
pub font: &'a FontAtlasDef,
pub images: &'a ImageTable,
pub one_bit: Option<OneBitLook<'a>>,
}Expand description
What a game’s frame is painted with: the font atlas and the pictures in
the game’s data. A backend makes its textures from them the first time
it sees them. Build it with Look::new (ADR-0039); a game that runs on
a one-bit display adds Look::with_one_bit (ADR-0062).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.font: &'a FontAtlasDefThe font atlas the glyph cells are drawn from.
images: &'a ImageTableThe pictures the sprite items name.
one_bit: Option<OneBitLook<'a>>What a one-bit display draws the frame with; None for a game that
has no one-bit look, which a one-bit backend says instead of drawing.
Implementations§
Source§impl<'a> Look<'a>
impl<'a> Look<'a>
Sourcepub const fn new(font: &'a FontAtlasDef, images: &'a ImageTable) -> Self
pub const fn new(font: &'a FontAtlasDef, images: &'a ImageTable) -> Self
The look of glyphs from font and pictures from images.
Sourcepub const fn with_one_bit(self, one_bit: OneBitLook<'a>) -> Self
pub const fn with_one_bit(self, one_bit: OneBitLook<'a>) -> Self
The same look, with what a one-bit display draws it with.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Look<'a>
impl<'a> !Send for Look<'a>
impl<'a> !Sync for Look<'a>
impl<'a> !UnwindSafe for Look<'a>
impl<'a> Freeze for Look<'a>
impl<'a> Unpin for Look<'a>
impl<'a> UnsafeUnpin for Look<'a>
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