This commit is contained in:
nora 2023-04-18 21:06:13 +02:00
parent 80206ebcd3
commit 98730fcab1
2 changed files with 6 additions and 4 deletions

View file

@ -1,8 +1,8 @@
use proc_macro::TokenStream;
use quote::quote;
#[proc_macro_derive(Inspect)]
pub fn derive_inspect(_: TokenStream) -> TokenStream {
#[proc_macro]
pub fn expand(_: TokenStream) -> TokenStream {
quote! {
impl GameState {
fn inspect_mut(&mut self) {

View file

@ -4,13 +4,15 @@ pub struct TileDef {
pub blend_graphic: String,
}
use egui_inspect_derive::Inspect;
use egui_inspect_derive::expand;
#[derive(Inspect)]
pub(crate) struct GameState {
pub(crate) tile_db: TileDb,
}
expand! {}
fn new() -> GameState {
loop {}
}