as per discussion with mindtree on slack, we thought it could be nice to:
Fullscreen type in the prelude to make it easier to access.fullscreen_on_primary_monitor() , .fullscreen_exclusive(), .fullscreen_on_monitor(monitor_handle)fullscreen_on_primary_monitor() seems a little verbose for what is probably 95% of desired user behaviour no? (ie to simply make the app full screen on the current display).
For example Cinder has one function to set / toggle fullscreen:
setFullScreen (bool fullScreen=true, const FullScreenOptions &options=FullScreenOptions())
The FullScreenOptions struct contains all the additional options that one might need for kiosk, exclusive, specific display etc. in advanced usecases but still has very low cognitive load / verbosity for the basic use case.
Thanks for the input @felixfaire !
One thing that makes this a little easier for cinder is that C++ has default function arguments. That said, I totally agree we can probably use nicer names for the common cases! How about something like:
.fullscreen() - 95% use case - fullscreen on the current display .fullscreen_with(fullscreen_opts) - fullscreen with the given Fullscreen options (see docs here).Maybe this is a bit nicer?
lovely. i havent looked much into the nannou specific use yet but is this an app initalising argument / setting? Is there a way to use this during runtime too? ie set full screen to true or false on user input?
Good Question! initially I was imagining we'd add this as a window builder, but now that you mention it, it would also be really handy to have this on the app builder, especially for sketches where you don't have access to the window creation process.
And yes, you can currently set fullscreen with .set_fullscreen(Option<Fullscreen>), but it would be nice to change this method to follow the convention of the builder method. Maybe it should look like this:
window.set_fullscreen(bool); Enable/disable borderless fullscreen on current monitorwindow.set_fullscreen_with(Options<Fullscreen>); Enable fullscreen with Some(opts), disable with None.
Most helpful comment
Thanks for the input @felixfaire !
One thing that makes this a little easier for cinder is that C++ has default function arguments. That said, I totally agree we can probably use nicer names for the common cases! How about something like:
.fullscreen()- 95% use case - fullscreen on the current display.fullscreen_with(fullscreen_opts)- fullscreen with the givenFullscreenoptions (see docs here).Maybe this is a bit nicer?