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 proc_macro::TokenStream;
use quote::quote; use quote::quote;
#[proc_macro_derive(Inspect)] #[proc_macro]
pub fn derive_inspect(_: TokenStream) -> TokenStream { pub fn expand(_: TokenStream) -> TokenStream {
quote! { quote! {
impl GameState { impl GameState {
fn inspect_mut(&mut self) { fn inspect_mut(&mut self) {

View file

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