Index

Press

MMO.inputs · 1 symbol · generated 30 Sep 2026

class

Press

Press.js:17

Press gesture: a click, a multi-click or a long press, depending on its options.

class MMO.inputs.Press extends MMO.inputs.Gesture
Namespace
MMO.inputs
Extends
Gesture

Index

constructor(input, name, opts)
clear(status)Override: also forget how many presses were counted so far.
update(e)Override: drive the press state machine.
statusProgress()How far along the gesture is, so a ui can show a progress ring while holding.
allowDispatch(gesture)Arbitrate against a competing gesture: a longer or multi press wins, so a double click does not also fire the single click that led to it.

Methods5

constructor(input, name, opts)

Press.js:18
constructor(input, name, opts)
input
name
opts

clear(status)

Press.js:27

Override: also forget how many presses were counted so far.

clear(status)
statusnumber

update(e)

Press.js:37

Override: drive the press state machine. Only the left button counts.

update(e)
eEvent
returnsbooleanfalse when the event is not for this gesture

statusProgress()

Press.js:79

How far along the gesture is, so a ui can show a progress ring while holding.

statusProgress()
returnsnumber0..1, always 0 when the gesture is not running

allowDispatch(gesture)

Press.js:91

Arbitrate against a competing gesture: a longer or multi press wins, so a double click does not also fire the single click that led to it.

allowDispatch(gesture)
gestureMMO.inputs.Gesture
returnsbooleanfalse to stay silent and let the other one through