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

Port old conrod example "simple_ui" to egui #862

Merged
merged 8 commits into from
Jun 12, 2022

Conversation

jorikvanveen
Copy link
Contributor

@jorikvanveen jorikvanveen commented Jun 2, 2022

This PR will add a new example: examples/ui/egui/simple_ui.rs, it's the egui version of an old example found here: https://github.com/nannou-org/nannou_conrod/blob/main/examples/simple_ui.rs. As requested in #856.

I'm relatively new to nannou and this is my first contribution so don't be afraid to tell me how I can do better!

Closes #856

@jorikvanveen jorikvanveen marked this pull request as ready for review June 2, 2022 12:04
@jorikvanveen
Copy link
Contributor Author

jorikvanveen commented Jun 2, 2022

Okay everything works except the position variable, the old example used an XYPad for this, but I can't really find anything comparable in egui. I could implement something like XYPad myself, but that would complicate the example and I'm not really sure if that's worth it considering the name of the example.

Copy link
Member

@mitchmindtree mitchmindtree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much @jorikvanveen, looking good!

I've left a few small suggestions, if you could address these I'd be happy to land this :)

examples/ui/egui/simple_ui.rs Outdated Show resolved Hide resolved
examples/ui/egui/simple_ui.rs Outdated Show resolved Hide resolved
examples/ui/egui/simple_ui.rs Outdated Show resolved Hide resolved
examples/ui/egui/simple_ui.rs Outdated Show resolved Hide resolved
examples/ui/egui/simple_ui.rs Show resolved Hide resolved
examples/ui/egui/simple_ui.rs Outdated Show resolved Hide resolved
@jorikvanveen
Copy link
Contributor Author

Okay I just committed everything (except the random color thing), LGTM!

@mitchmindtree mitchmindtree merged commit 91180f0 into nannou-org:master Jun 12, 2022
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.

Port old simple_ui.rs example to use nannou_egui
2 participants