" />

gb.buttons.repeat

DESCRIPTION


Function used to trigger a repetitive action at a given period when a button is held down.

SYNTAX


gb.buttons.repeat(button, duration);

 

PARAMETERS


  • button (byte): the identifier of the button, to choose from¬†BTN_A, BTN_B, BTN_C, BTN_UP, BTN_RIGHT, BTN_DOWN, BTN_LEFT
  • duration (byte): the duration in number of frames (20 frames per second by default)

RETURNS


  • boolean: returns true every <duration> frames when the button is held down

SEE ALSO


0