Moai SDK  2.0
MOAIButtonSensor Class Reference
+ Inheritance diagram for MOAIButtonSensor:

Function List

down
 
isDown
 
isUp
 
up
 
setCallback
 

Function Documentation

down

Checks to see if the button was pressed during the last iteration.


function down ( MOAIButtonSensor self )

Parameters
MOAIButtonSensorself
Returns
boolean wasPressed
isDown

Checks to see if the button is currently down.


function isDown ( MOAIButtonSensor self )

Parameters
MOAIButtonSensorself
Returns
boolean isDown
isUp

Checks to see if the button is currently up.


function isUp ( MOAIButtonSensor self )

Parameters
MOAIButtonSensorself
Returns
boolean isUp
setCallback

Sets or clears the callback to be issued when button events occur.


function setCallback ( MOAIButtonSensor self [, function callback ] )

Parameters
MOAIButtonSensorself
functioncallback Optional. Default value is nil.
Returns
nil
up

Checks to see if the button was released during the last iteration.


function up ( MOAIButtonSensor self )

Parameters
MOAIButtonSensorself
Returns
boolean wasReleased