|
Moai SDK
1.5 revision 1 (MoaiEdition)
|
Function List | |
| down | |
| getActiveTouches | |
| getTouch | |
| hasTouches | |
| isDown | |
| setAcceptCancel | |
| setCallback | |
| setTapMargin | |
| setTapTime | |
| up | |
Checks to see if the screen was touched during the last iteration.
function down ( MOAITouchSensor self [, number idx ] )
| self | ( MOAITouchSensor ) |
| idx | ( number ) Optional. Index of touch to check. |
Returns the IDs of all of the touches currently occurring (for use with getTouch).
function getActiveTouches ( MOAITouchSensor self )
| self | ( MOAITouchSensor ) |
Checks to see if there are currently touches being made on the screen.
function getTouch ( MOAITouchSensor self, number id )
| self | ( MOAITouchSensor ) |
| id | ( number ) The ID of the touch. |
Checks to see if there are currently touches being made on the screen.
function hasTouches ( MOAITouchSensor self )
| self | ( MOAITouchSensor ) |
Checks to see if the touch status is currently down.
function isDown ( MOAITouchSensor self [, number idx ] )
| self | ( MOAITouchSensor ) |
| idx | ( number ) Optional. Index of touch to check. |
Sets whether or not to accept cancel events ( these happen on iOS backgrounding ), default value is false.
function setAcceptCancel ( MOAITouchSensor self, boolean accept )
| self | ( MOAITouchSensor ) |
| accept | ( boolean ) true then touch cancel events will be sent |
Sets or clears the callback to be issued when the pointer location changes.
function setCallback ( MOAITouchSensor self [, function callback ] )
| self | ( MOAITouchSensor ) |
| callback | ( function ) Optional. Default value is nil. |
Sets maximum distance between two touches for them to be considered a tap.
function setTapMargin ( MOAITouchSensor self, number margin )
| self | ( MOAITouchSensor ) |
| margin | ( number ) Max difference on x and y between taps |
Sets the time between each touch for it to be counted as a tap.
function setTapTime ( MOAITouchSensor self, number time )
| self | ( MOAITouchSensor ) |
| time | ( number ) New time between taps |
Checks to see if the screen was untouched (is no longer being touched) during the last iteration.
function up ( MOAITouchSensor self [, number idx ] )
| self | ( MOAITouchSensor ) |
| idx | ( number ) Optional. Index of touch to check. |