Skip to main content

label

Macro label 

Source
macro_rules! label {
    (vlogger: $vlogger:expr, target: $target:expr, $surface:expr, $($arg:tt)+) => { ... };
    (vlogger: $vlogger:expr, $surface:expr, $($arg:tt)+) => { ... };
    (target: $target:expr, $surface:expr, $($arg:tt)+) => { ... };
    ($surface:expr, $($arg:tt)+) => { ... };
}
Expand description

Sends a label/text annotation to the vlogger.

ยงExamples

use v_log::label;

let pos = [3.234, -1.223];

label!("main_surface", pos, (12.0, Base, "<"), "Position is: x: {}, y: {}", pos[0], pos[1]);
label!("main_surface", pos, "Flexible position"); // with size 12.0, flexible alignment and "Base" color