Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a macro to generate boilerplate methods #76

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

PiotrekB416
Copy link

@PiotrekB416 PiotrekB416 commented Dec 30, 2024

Fixes: #74

Instead of manually implementing methods for event propagation use a wrapper struct.

@Supreeeme
Copy link

One aspect of egui-miniquad (and miniquad, and egui) I personally value is the fast compilation times, and adding syn as a dependency hurts that. It's up to the maintainers if they're okay with this, but if not, I have a feeling this can be accomplished through some combination of new traits and wrapper structs. Alternatively, could also look at something like venial.

@PiotrekB416
Copy link
Author

Ok so i figured out a way to do this without macros.
Let me know if this solution is good

@Supreeeme
Copy link

I do like how this looks more 🙂 I think "Stage" is not an intuitive name, though I don't have a real suggestion to improve it. Also I think the example at the top of lib.rs should be updated too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce EventHandler boilerplate?
2 participants