Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIButtonSensor Class Reference
Inheritance diagram for MOAIButtonSensor:
MOAISensor

List of all members.

Function List

  down
  isDown
  isUp
  up
  setCallback

Function Documentation

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


function down ( MOAIButtonSensor self )
Parameters:
self ( MOAIButtonSensor )
Returns:
wasPressed ( boolean )

Checks to see if the button is currently down.


function isDown ( MOAIButtonSensor self )
Parameters:
self ( MOAIButtonSensor )
Returns:
isDown ( boolean )

Checks to see if the button is currently up.


function isUp ( MOAIButtonSensor self )
Parameters:
self ( MOAIButtonSensor )
Returns:
isUp ( boolean )

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


function setCallback ( MOAIButtonSensor self [, function callback ] )
Parameters:
self ( MOAIButtonSensor )
callback ( function ) 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:
self ( MOAIButtonSensor )
Returns:
wasReleased ( boolean )