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

refactor RunMode: move it from backend to the demo App #23

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

emilk
Copy link
Owner

@emilk emilk commented Sep 15, 2020

This simplifies the egui_glium and egui_web backends substantially, reduces the scope of RunMode to a single file, and removes duplicated code.

Basically: this is how I should have written it from the beginning.

@parasyte You may want to take a look at the the changes to egui_glium/src/backend.rs. I don't think I could have broken what you fixed, but maybe your fix can be further simplified now that there is less complexity involved w.r.t. #21.

Copy link
Contributor

@parasyte parasyte left a comment

Choose a reason for hiding this comment

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

@emilk Thanks for the heads up. I'm happy to report that Continuous RunMode still works correctly on this branch. It also (surprisingly) fixes the animation behavior with Reactive mode on Windows! I believe the changes in backend.rs are responsible for this, since animations should request a repaint, and not just the RunMode.

Input handling is still a bit sketchy with Continuous mode on macOS, but I think honestly this PR fixes enough of the small issues I've had that it obsoletes Continuous mode.

Of course, if the app itself wants to repaint every frame, it can always do that regardless.

This simplifies the egui_glium and egui_web backends substantially,
reduces the scope of RunMode to a single file, and
removes duplicated code.

Basically: this is how I should have written it from the beginning.
@emilk emilk merged commit 5856cde into master Sep 16, 2020
@emilk emilk deleted the refactor-run_mode branch September 16, 2020 06:03
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.

2 participants