Macro ascii_forge::render

source ·
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 AsMut This render will return the location of which the last element finished rendering. Example

use crate::prelude::*;

// Create a window
let window = Window::init()?;

// Render This works! and Another Element! To the window's buffer
render!(
    window,
        vec2(16, 16) => [ "This works!" ]
        vec2(0, 0) => [ "Another Element!" ]
);