Class Pressable

A pressable input source that stores it's own state State gets updated by an InputSource class that contains the pressable

class Pressable(T) ;

Constructors

NameDescription
this Constructor for a pressable takes its id

Fields

NameTypeDescription
id TThe identifier for the pressable
lastPressed SysTimeThe time at which this pressable was pressed
lastReleased SysTimeThe time at which this pressable was released

Properties

NameTypeDescription
isPressed[get] boolReturns whether or not this pressable is currently being held

Methods

NameDescription
testAndRelease Checks if this pressable is pressed If it is, it will mark it as released Returns whether this was actually pressed or not