Macro veloren_voxygen::image_ids
source · macro_rules! image_ids { ($($v:vis struct $Ids:ident { $( <$T:ty> $( $name:ident: $specifier:expr ),* $(,)? )* })*) => { ... }; }
Expand description
This macro will automatically load all specified assets, get the corresponding ImgIds and create a struct with all of them.
Example usage:
ⓘ
use veloren_voxygen::{
image_ids,
ui::img_ids::{BlankGraphic, ImageGraphic, VoxelGraphic},
};
image_ids! {
pub struct Imgs {
<VoxelGraphic>
button1: "specifier1",
button2: "specifier2",
<ImageGraphic>
background: "background",
<BlankGraphic>
blank: (),
}
}