Difference between revisions of "love.focus (Français)"
(Début de la traduction FR) |
m (Corrections de fautes) |
||
Line 7: | Line 7: | ||
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
− | {{param|boolean|f| | + | {{param|boolean|f|Focus de la fenêtre, <code>true</code> si la fenêtre reçoit le focus, <code>false</code> sinon. }} |
=== Returns === | === Returns === | ||
Rien. | Rien. | ||
− | == | + | == Exemple == |
− | <source lang="lua"> | + | <source lang="lua"> |
− | |||
function love.load() | function love.load() | ||
text = "FOCUSED" | text = "FOCUSED" |
Revision as of 10:44, 4 January 2011
Available since LÖVE 0.7.0 |
It is not supported in earlier versions. |
Fonction de rappel appelée quand la fenêtre principale reçoit ou perds le focus.
Fonction
Synopsis
love.focus(f)
Arguments
boolean f
- Focus de la fenêtre,
true
si la fenêtre reçoit le focus,false
sinon.
Returns
Rien.
Exemple
function love.load()
text = "FOCUSED"
end
function love.draw()
love.graphics.print(text,0,0)
end
function love.focus(f)
if not f then
text = "UNFOCUSED!!"
print("LOST FOCUS")
else
text = "FOCUSED!"
print("GAINED FOCUS")
end
end
Voir Aussi
Autres Langues
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