pub struct WindowController {
pub matrix: Matrix<Color>,
pub window: Window,
/* private fields */
}Expand description
WindowController holds the main interaction between the actual matrix holding the tiles and the minifb Window.
Fields§
§matrix: Matrix<Color>Where colors to be displayed are stored.
window: WindowProvided by minifb, the device that displays the tiles.
Implementations§
Source§impl WindowController
impl WindowController
Sourcepub fn new(
name: &str,
dimensions: Dimensions,
scale: Scale,
wrapping: bool,
) -> Self
pub fn new( name: &str, dimensions: Dimensions, scale: Scale, wrapping: bool, ) -> Self
Creates a new WindowController with intended matrix width and height. The scale is only initial scale when the Window is created. It may be rescaled. The Window is set with target 60fps.
pub fn update_buffer( &mut self, buffer: impl Iterator<Item = Color>, ) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for WindowController
impl !RefUnwindSafe for WindowController
impl !Send for WindowController
impl !Sync for WindowController
impl Unpin for WindowController
impl !UnwindSafe for WindowController
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