Difference between revisions of "love.window.setMode (한국어)"

(Created page with "{{newin|0.9.0|090|type=function|text=Moved from love.graphics.setMode}} 윈도우의 총괄적인 상태를 변경합니다. 모니터 전체의 크기로 너비나 높...")
 
m
 
(6 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
모니터 전체의 크기로 너비나 높이를 변경하려면 이들의 값을 0으로 설정하세요.
 
모니터 전체의 크기로 너비나 높이를 변경하려면 이들의 값을 0으로 설정하세요.
  
이 함수를 사용할 경우 부수 효과가 발생할 수도 있습니다. for example, [[canvas]]es will be cleared; make sure to save their contents beforehand if you need to.
+
이 함수를 사용할 경우 [[Canvas (한국어)|Canvas]]가 초기화되는 둥 여러가지 부수 효과가 발생할 수도 있습니다. 해당 데이터에 중요한 정보가 담겨 있다면 보존해 두어야 합니다.
 
== 함수 ==
 
== 함수 ==
 
=== 형식 ===
 
=== 형식 ===
Line 12: Line 12:
 
</source>
 
</source>
 
=== 매개변수 ===
 
=== 매개변수 ===
{{param|number (한국어)|width|화면의 너비.}}
+
{{param|number (한국어)|width|윈도우의 너비.}}
{{param|number (한국어)|height|화면의 높이.}}
+
{{param|number (한국어)|height|윈도우의 높이.}}
 
{{param|table (한국어)|flags|플래그 테이블.}}
 
{{param|table (한국어)|flags|플래그 테이블.}}
{{subparam|boolean (한국어)|fullscreen (false)|Fullscreen (true), or windowed (false).}}
+
{{subparam|boolean (한국어)|fullscreen (false)|전체 화면이면 true, 윈도우면 false.}}
{{subparam|FullscreenType (한국어)|fullscreentype ("normal")|The type of fullscreen to use.}}
+
{{subparam|FullscreenType (한국어)|fullscreentype ("normal")|전체 화면 모드 종류.}}
{{subparam|boolean (한국어)|vsync (true)|True if LÖVE should wait for vsync, false otherwise.}}
+
{{subparam|boolean (한국어)|vsync (true)|수직 동기화 사용 여부.}}
{{subparam|number (한국어)|fsaa (0)|The number of antialiasing samples.}}
+
{{subparam|number (한국어)|fsaa (0)|사용되고 있는 전체 화면 모드의 종류.}}
{{subparam|boolean (한국어)|resizable (false)|True if the window should be resizable in windowed mode, false otherwise.}}
+
{{subparam|boolean (한국어)|resizable (false)|윈도우 크기가 변경 가능하면 true.}}
{{subparam|boolean (한국어)|borderless (false)|True if the window should be borderless in windowed mode, false otherwise.}}
+
{{subparam|boolean (한국어)|borderless (false)|전체 화면 모드가 아닐 때, 윈도우의 테두리가 없다면 true.}}
{{subparam|boolean (한국어)|centered (true)|True if the window should be centered in windowed mode, false otherwise.}}
+
{{subparam|boolean (한국어)|centered (true)|화면 중앙에 윈도우가 위치하도록 강제되면 true.}}
{{subparam|number (한국어)|display (1)|The index of the display to show the window in, if multiple monitors are available.}}
+
{{subparam|number (한국어)|display (1)|다중 모니터일 때 모니터 번호.}}
{{subparam|number (한국어)|minwidth (1)|The minimum width of the window, if it's resizable. Cannot be less than 1.}}
+
{{subparam|number (한국어)|minwidth (1)|윈도우의 크기가 변경 가능할 때 최소 너비. 1 이하일 수 없음.}}
{{subparam|number (한국어)|minheight (1)|The minimum height of the window, if it's resizable. Cannot be less than 1.}}
+
{{subparam|number (한국어)|minheight (1)|윈도우의 크기가 변경 가능할 때 최소 높이. 1 이하일 수 없음.}}
 
=== 리턴값 ===
 
=== 리턴값 ===
 
{{param|boolean (한국어)|success|성공적으로 설정되었으면 true.}}
 
{{param|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 [[love.resize|resize]] event will be triggered.
+
normal 전체 화면 모드로 진입할 때 현재 윈도우의 크기를 모니터가 지원하지 못할 경우, desktop 모드에서 윈도우의 크기가 모니터와 일치하지 않는 경우 윈도우의 크기는 적당한 값으로 재조정하면서 전체 화면에 진입합니다. 전체 화면 모드에서 이 함수를 다시 사용하면 원래 윈도우 크기로 되돌아올 수 있습니다. 자세한 정보는 [[FullscreenType (한국어)|FullscreenType]]을 참조하세요.
  
If the fullscreen type is "desktop", then the window will be automatically resized to the desktop resolution.
+
만약 [[Config Files (한국어)|conf.lua]]에서 window 모듈을 사용 안함으로 설정하고 이 함수를 통해 수동으로 윈도우를 만들 경우, 만들기 전에 어떠한 [[love.graphics (한국어)|love.graphics]].* 함수도 호출하면 안됩니다. 그렇게 하면 OpenGL이 윈도우 없이 동작하려고 하여 작동을 중단하거나, 혹은 여러 가지 예기치 않은 동작이 발생할 것입니다.
  
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.
 
  
 
== 예제 ==
 
== 예제 ==
수직 동기화를 끄고 크기 변경을 켠 후 최소 높이와 너비로 설정.
+
수직 동기화를 끄고 크기 변경을 켠 후 최소 높이와 너비를 설정.
 
<source lang="lua">
 
<source lang="lua">
 
function love.load()
 
function love.load()

Latest revision as of 06:51, 28 January 2014

Available since LÖVE 0.9.0
Moved from love.graphics.setMode.


윈도우의 총괄적인 상태를 변경합니다.

모니터 전체의 크기로 너비나 높이를 변경하려면 이들의 값을 0으로 설정하세요.

이 함수를 사용할 경우 Canvas가 초기화되는 둥 여러가지 부수 효과가 발생할 수도 있습니다. 해당 데이터에 중요한 정보가 담겨 있다면 보존해 두어야 합니다.

함수

형식

success = love.window.setMode( width, height, flags )

매개변수

number (한국어) width
윈도우의 너비.
number (한국어) height
윈도우의 높이.
table (한국어) flags
플래그 테이블.
boolean (한국어) fullscreen (false)
전체 화면이면 true, 윈도우면 false.
FullscreenType (한국어) fullscreentype ("normal")
전체 화면 모드 종류.
boolean (한국어) vsync (true)
수직 동기화 사용 여부.
number (한국어) fsaa (0)
사용되고 있는 전체 화면 모드의 종류.
boolean (한국어) resizable (false)
윈도우 크기가 변경 가능하면 true.
boolean (한국어) borderless (false)
전체 화면 모드가 아닐 때, 윈도우의 테두리가 없다면 true.
boolean (한국어) centered (true)
화면 중앙에 윈도우가 위치하도록 강제되면 true.
number (한국어) display (1)
다중 모니터일 때 모니터 번호.
number (한국어) minwidth (1)
윈도우의 크기가 변경 가능할 때 최소 너비. 1 이하일 수 없음.
number (한국어) minheight (1)
윈도우의 크기가 변경 가능할 때 최소 높이. 1 이하일 수 없음.

리턴값

boolean (한국어) success
성공적으로 설정되었으면 true.

알아 두기

normal 전체 화면 모드로 진입할 때 현재 윈도우의 크기를 모니터가 지원하지 못할 경우, desktop 모드에서 윈도우의 크기가 모니터와 일치하지 않는 경우 윈도우의 크기는 적당한 값으로 재조정하면서 전체 화면에 진입합니다. 전체 화면 모드에서 이 함수를 다시 사용하면 원래 윈도우 크기로 되돌아올 수 있습니다. 자세한 정보는 FullscreenType을 참조하세요.

만약 conf.lua에서 window 모듈을 사용 안함으로 설정하고 이 함수를 통해 수동으로 윈도우를 만들 경우, 만들기 전에 어떠한 love.graphics.* 함수도 호출하면 안됩니다. 그렇게 하면 OpenGL이 윈도우 없이 동작하려고 하여 작동을 중단하거나, 혹은 여러 가지 예기치 않은 동작이 발생할 것입니다.

투명한 배경은 아직 지원되지 않고 있습니다.

예제

수직 동기화를 끄고 크기 변경을 켠 후 최소 높이와 너비를 설정.

function love.load()
    love.window.setMode(800, 600, {resizable=true, vsync=false, minwidth=400, minheight=300})
end

같이 보기


다른 언어