Class: ControlsAndInputManager

(private) Managers.ControlsAndInputManager() → {ControlsAndInputManager}

represents controls and input to handle the onscreen menu, keyboard and mouse

Constructor

(private) new ControlsAndInputManager() → {ControlsAndInputManager}

Private constructor to enforce singleton pattern
Source:
Returns:
Type
ControlsAndInputManager

Members

instance

Singleton instance
Source:

isMenuDisplayed :boolean

whether the menu is currently displayed
Type:
  • boolean
Default Value:
  • false
Source:

playbackButton :PlayButton

A playback button displayed in the top left of the screen
Type:
  • PlayButton
Source:

Methods

draw()

draws the playback button and potentially the menu
Parameters:
Type Description
P5 p5 instance
Source:

keyPressed(key)

responds to keyboard presses
Parameters:
Name Type Description
key number the ascii code of the keypressed
Source:
draw out menu items for each visualisation
Parameters:
Type Description
P5 p5 instance
Source:

mousePressed()

make the window fullscreen or revert to windowed
Parameters:
Type Description
P5 p5 instance
Source: