love.touchpressed
Callback function triggered when the touch screen is touched.
Function
Synopsis
love.touchpressed( id, x, y, pressure )
Arguments
userdata id
- The identifier for the touch press.
number x
- The x-axis position of the touch press inside the window, in pixels.
number y
- The y-axis position of the touch press inside the window, in pixels.
number pressure
- The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.
Returns
Nothing.
Notes
The identifier is only guaranteed to be unique for the specific touch press until love.touchreleased is called with that identifier, at which point it may be reused for new touch presses.
The unofficial Android and iOS ports of LÖVE 0.9.2 reported touch positions as normalized values in the range of [0, 1], whereas this API reports positions in pixels.
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