love.mousereleased (Italiano)
Funzione callback chiamata quando un tasto del mouse viene rilasciato.
Contents
Funzione
Sintesi
love.mousereleased( x, y, button, istouch, presses )
Parametri
number (Italiano) x
- Posizione x del mouse, in pixel.
number (Italiano) y
- Posizione y del mouse, in pixel.
number (Italiano) button
- Il numero corrispondente al tasto del mouse rilasciato: 1 è il tasto primario, 2 il secondario e 3 il tasto centrale. Eventuali altri numeri dipendono dal mouse usato.
boolean (Italiano) istouch
- True se l'evento proviene dal tap su un touchscreen.
Cosa ritorna
Nulla.
Funzione
Removed in LÖVE 0.10.0 |
This variant is not supported in that and later versions. |
Sintesi
love.mousereleased( x, y, button )
Parametri
number (Italiano) x
- Posizione x del mouse.
number (Italiano) y
- Posizione y del mouse.
MouseConstant (Italiano) button
- Tasto del mouse rilasciato, esclusa la rotella.
Cosa ritorna
Nulla.
Esempi
Scrivi un testo ("Ciao mondo") ovunque l'utente cliccki il tasto primario del mouse.
function love.load()
printx = 0
printy = 0
end
function love.draw()
love.graphics.print("Ciao mondo", printx, printy)
end
function love.mousereleased(x, y, button)
if button == 1 then
printx = x
printy = y
end
end
Vedi anche
In altre lingue
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