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

Fullscreen #674

Closed
wants to merge 5 commits into from
Closed

Fullscreen #674

wants to merge 5 commits into from

Conversation

jeremymeadows
Copy link

The default state can be set with the NativeOptions at compile time, and can be changed by using a callback to the UI context during runtime. The fullscreen state is written to the RON file so that the user-set state is restored on each launch.

I added a 'toggle fullscreen' button to the UI too, so that can be previewed.

Closes #662.

The default state can be set with the `NativeOptions` at compile time,
and can be changed by using a callback to the UI context during runtime.
The fullscreen state is written to the RON file so that the user-set
state is restored on each launch.
I added a 'toggle fullscreen' button to the UI too, so that can be
previewed.
@emilk
Copy link
Owner

emilk commented Aug 28, 2021

Thanks for the PR!

fullscreen is not something that should be part of the egui crate, but instead should be part of the epi::Frame API, just like set_window_size is!

See #672 for how something similar was implemented.

@jeremymeadows
Copy link
Author

Got it, sorry I didn’t see that second comment you made on the issue, but I'll see what I can do about moving that around :)

added logic to restore previous window size when exiting fullscreen
@jeremymeadows
Copy link
Author

I got really busy with school stuff and work for several weeks, but finally winding down. I moved those changes around. It was a little tricky to deal with the AppOutput resetting itself every frame; that would undo whatever state was set in the previous frame. I pulled it out to give it slightly broader scope, and I didn't notice any problems it caused.

@emilk
Copy link
Owner

emilk commented Sep 20, 2021

It was a little tricky to deal with the AppOutput resetting itself every frame

Yeah, it is in need of a refactor.

@emilk
Copy link
Owner

emilk commented Apr 16, 2022

Any interest in this still?

@antouhou
Copy link

@emilk Yes! Is there any way I can help get this merged?

@emilk
Copy link
Owner

emilk commented Apr 19, 2022

@antouhou Since a lot in this PR is outdated (a lot of epi/eframe refactor), I'm guessing your best bet it so create a new PR from scratch, perhaps with some inspiration taken from this one.

emilk added a commit that referenced this pull request Jul 29, 2022
@emilk emilk closed this in #1866 Jul 29, 2022
emilk added a commit that referenced this pull request Jul 29, 2022
Closes #674

Adds `NativeOptions:fullscreen`, `Frame::set_fullscreen` and `WindowInfo::fullscreen`.
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.

Support for fullscreen windowing
3 participants