love.window.setMode (한국어)
Available since LÖVE 0.9.0 |
Moved from love.graphics.setMode. |
윈도우의 총괄적인 상태를 변경합니다.
모니터 전체의 크기로 너비나 높이를 변경하려면 이들의 값을 0으로 설정하세요.
이 함수를 사용할 경우 부수 효과가 발생할 수도 있습니다. for example, canvases will be cleared; make sure to save their contents beforehand if you need to.
함수
형식
success = love.window.setMode( width, height, flags )
매개변수
number (한국어) width
- 화면의 너비.
number (한국어) height
- 화면의 높이.
table (한국어) flags
- 플래그 테이블.
boolean (한국어) fullscreen (false)
- Fullscreen (true), or windowed (false).
FullscreenType (한국어) fullscreentype ("normal")
- The type of fullscreen to use.
boolean (한국어) vsync (true)
- True if LÖVE should wait for vsync, false otherwise.
number (한국어) fsaa (0)
- The number of antialiasing samples.
boolean (한국어) resizable (false)
- True if the window should be resizable in windowed mode, false otherwise.
boolean (한국어) borderless (false)
- True if the window should be borderless in windowed mode, false otherwise.
boolean (한국어) centered (true)
- True if the window should be centered in windowed mode, false otherwise.
number (한국어) display (1)
- The index of the display to show the window in, if multiple monitors are available.
number (한국어) minwidth (1)
- The minimum width of the window, if it's resizable. Cannot be less than 1.
number (한국어) minheight (1)
- The minimum height of the window, if it's resizable. Cannot be less than 1.
리턴값
boolean (한국어) success
- 성공적으로 설정되었으면 true.
알아 두기
If fullscreen is enabled and the width or height is not supported (see love.window.getFullscreenModes), the window may be resized to the closest available resolution and a resize event will be triggered.
If the fullscreen type is "desktop", then the window will be automatically resized to the desktop resolution.
If you have disabled the window in conf.lua and use this functon to manually create the window, then you must not call any other love.graphics.* function before this one. Doing so will result in undefined behavior and/or crashes because OpenGL cannot function properly without a window.
Transparent backgrounds are currently not supported.
예제
수직 동기화를 끄고 크기 변경을 켠 후 최소 높이와 너비로 설정.
function love.load()
love.window.setMode(800, 600, {resizable=true, vsync=false, minwidth=400, minheight=300})
end
같이 보기
다른 언어
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info