Module flower.InputMgr

This singleton class manages all input events (touch, key, cursor).

Extends:

Info:

  • Release: V3.0.0
  • Author: Makoto

Functions

InputMgr:initialize () Initialize.
InputMgr:keyIsDown (key) If the user has pressed a key returns true.
InputMgr:isMouseLeftDown () Returns true if you are down on the left side of the mouse.
InputMgr:isMouseMiddleDown () Returns true if you are down on the middle side of the mouse.
InputMgr:isMouseRightDown () Returns true if you are down on the left side of the mouse.
InputMgr:getMousePoint () Returns the position of the mouse
InputMgr:isTouchDown (idx) Checks to see if the touch status is currently down.
InputMgr:hasTouches () Checks to see if there are currently touches being made on the screen.
InputMgr:getTouch (idx) Returns the touch data with the specified ID.
InputMgr:getActiveTouches () Returns the IDs of all of the touches currently occurring (for use with getTouch).


Functions

InputMgr:initialize ()
Initialize. Called by openWindow function.
InputMgr:keyIsDown (key)
If the user has pressed a key returns true.

Parameters:

  • key Key code

Returns:

    true is a key is down.
InputMgr:isMouseLeftDown ()
Returns true if you are down on the left side of the mouse.

Returns:

    true or false
InputMgr:isMouseMiddleDown ()
Returns true if you are down on the middle side of the mouse.

Returns:

    true or false
InputMgr:isMouseRightDown ()
Returns true if you are down on the left side of the mouse.

Returns:

    true or false
InputMgr:getMousePoint ()
Returns the position of the mouse

Returns:

    x-position, y-position
InputMgr:isTouchDown (idx)
Checks to see if the touch status is currently down.

Parameters:

  • idx Index of touch to check.

Returns:

    isDown
InputMgr:hasTouches ()
Checks to see if there are currently touches being made on the screen.

Returns:

    hasTouches
InputMgr:getTouch (idx)
Returns the touch data with the specified ID.

Parameters:

  • idx The ID of the touch.

Returns:

    x, y, tapCount
InputMgr:getActiveTouches ()
Returns the IDs of all of the touches currently occurring (for use with getTouch).

Returns:

    idx1, idx2, ..., idxN
generated by LDoc 1.3