MCPcopy
hub / github.com/KilledByAPixel/LittleJS / getNavigationWasPressed

Method getNavigationWasPressed

plugins/uiSystem.js:598–602  ·  view source on GitHub ↗

Get if navigation button was pressed from gamepad or keyboard * @return {boolean}

()

Source from the content-addressed store, hash-verified

596 /** Get if navigation button was pressed from gamepad or keyboard
597 * @return {boolean} */
598 getNavigationWasPressed()
599 {
600 return isUsingGamepad ? gamepadWasPressed(0, gamepadPrimary) :
601 keyWasPressed('Space') || keyWasPressed('Enter');
602 }
603
604 /** Show a confirmation dialog with Yes/No buttons
605 * Centers the dialog on the screen with darkened background

Callers 1

uiUpdateMethod · 0.80

Calls 2

gamepadWasPressedFunction · 0.85
keyWasPressedFunction · 0.85

Tested by

no test coverage detected