app: make Fullscreen, Windowed Options

Instead of

app.WindowMode(app.Fullscreen)

programs can now just use

app.Fullscreen

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-04-23 10:25:24 +02:00
parent 9dae29844c
commit a06a7a4b3c
+5 -5
View File
@@ -455,17 +455,17 @@ func (q *queue) Events(k event.Tag) []event.Event {
return q.q.Events(k) return q.q.Events(k)
} }
const ( var (
// Windowed is the normal window mode with OS specific window decorations. // Windowed is the normal window mode with OS specific window decorations.
Windowed = wm.Windowed Windowed = windowMode(wm.Windowed)
// Fullscreen is the full screen window mode. // Fullscreen is the full screen window mode.
Fullscreen = wm.Fullscreen Fullscreen = windowMode(wm.Fullscreen)
) )
// WindowMode sets the window mode. // windowMode sets the window mode.
// //
// Supported platforms are macOS, X11 and Windows. // Supported platforms are macOS, X11 and Windows.
func WindowMode(mode wm.WindowMode) Option { func windowMode(mode wm.WindowMode) Option {
return func(opts *wm.Options) { return func(opts *wm.Options) {
opts.WindowMode = &mode opts.WindowMode = &mode
} }