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
// Create a buffer
let mut buffer = Buffer::new((32, 32));
// Render This works! and Another Element! To the window's buffer
render!(
buffer,
(16, 16) => [ "This works!" ],
(0, 0) => [ "Another Element!" ]
);