JSDoc: Class: Pointer

# Class: Pointer

## action.InputState.Pointer(subtype)

Input state associated with a pointer-type input device.

## Constructor

#### new Pointer(subtype)

##### Parameters:

Name | Type | Description
--- | --- | ---
`subtype` | string | Kind of pointing device: mouse, pen, touch.

Source:
  - action.js, line 572

##### Throws:

If subtype is undefined or an invalid pointer type.

Type
  InvalidArgumentError

### Methods

#### isPressed(button) → {boolean}

Check whether |button| is pressed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`button` | number | Positive integer that refers to a mouse button.

Source:
  - action.js, line 592

##### Returns:

True if |button| is in set of pressed buttons.

Type
  boolean

#### press(button) → {Set}

Add |button| to the set of pressed keys.

##### Parameters:

Name | Type | Description
--- | --- | ---
`button` | number | Positive integer that refers to a mouse button.

Source:
  - action.js, line 606

##### Returns:

Set of pressed buttons.

Type
  Set

#### release(button) → {boolean}

Remove |button| from the set of pressed buttons.

##### Parameters:

Name | Type | Description
--- | --- | ---
`button` | number | A positive integer that refers to a mouse button.

Source:
  - action.js, line 620

##### Returns:

True if |button| was present before removals, false otherwise.

Type
  boolean