macro_rules! render {
($buffer:expr, $( $loc:expr => [$($render:expr),* $(,)?]),* $(,)? ) => { ... };
}
Expand description
A macro to simplify rendering lots of items at once.
The Buffer can be anything that implements AsMutExample
use crate::prelude::*;
// Create a window
let window = Window::init()?;
// Render This works! and Another Element! To the window's buffer
render!(
window,
(16, 16) => [ "This works!" ]
(0, 0) => [ "Another Element!" ]
);