love.window.setFullscreen

love.window.setFullscreen

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Enters or exits fullscreen. The display to use when entering fullscreen is chosen based on which display the window is currently in, if multiple monitors are connected.

Function

Synopsis

success = love.window.setFullscreen( fullscreen )

Arguments

boolean fullscreen
Whether to enter or exit fullscreen mode.

Returns

boolean success
True if successful, false otherwise.

Function

Synopsis

success = love.window.setFullscreen( fullscreen, fstype )

Arguments

boolean fullscreen
Whether to enter or exit fullscreen mode.
FullscreenType fstype
The type of fullscreen mode to use.

Returns

boolean success
True if successful, false otherwise.

Notes

If fullscreen mode is entered and the window size doesn't match one of the monitor's display modes (in normal fullscreen mode) or the window size doesn't match the desktop size (in 'desktop' fullscreen mode), the window will be resized appropriately. The window will revert back to its original size again when fullscreen mode is exited using this function.

Examples

Make the window fullscreen in desktop mode.

function love.load()
    love.window.setFullscreen(true, "desktop")
end

See Also

© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.window.setFullscreen

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部