Difference between revisions of "love.focus"
m |
m |
||
Line 7: | Line 7: | ||
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
− | {{param|boolean|f| | + | {{param|boolean|f|True if the window gains focus, false if it loses focus. }} |
=== Returns === | === Returns === | ||
Nothing. | Nothing. |
Revision as of 01:02, 30 January 2016
Available since LÖVE 0.7.0 |
This callback is not supported in earlier versions. |
Callback function triggered when window receives or loses focus.
Function
Synopsis
love.focus( f )
Arguments
boolean f
- True if the window gains focus, false if it loses focus.
Returns
Nothing.
Example
function love.load()
text = "FOCUSED"
end
function love.draw()
love.graphics.print(text,0,0)
end
function love.focus(f)
if f then
print("Window is focused.")
text = "FOCUSED"
else
print("Window is not focused.")
text = "UNFOCUSED"
end
end
See Also
Other Languages
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