gb.buttons.timeHeld

From Gamebuino Wiki
Revision as of 2014-05-19T20:32:13 by Rodot (talk | contribs) (creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Description

This function is used to know how long a button has been held down.

Syntax

gb.buttons.timeHeld(button);

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

Returns

  • byte: how long the button has been held down, in number of frames (20 frames per second by default)

Example

See also