Difference between revisions of "Gb.buttons.repeat"
From Gamebuino Wiki
(creation) |
m |
||
Line 1: | Line 1: | ||
− | {{ | + | {{lowercase}} |
__NOTOC__ | __NOTOC__ | ||
== Description == | == Description == |
Latest revision as of 2014-05-20T20:05:36
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
Example