Difference between revisions of "Gb.buttons.pressed"

From Gamebuino Wiki
Jump to: navigation, search
(page creation)
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:gb.buttons.pressed}}
+
{{lowercase}}
 
__NOTOC__
 
__NOTOC__
 
== Description ==
 
== Description ==
Displays a pop-up message on the bottom of the screen for a given duration.
+
Function used to know when a given button is pressed.
  
 
== Syntax ==
 
== Syntax ==
Line 8: Line 8:
  
 
== Parameters ==
 
== 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
+
* button (byte): the identifier of the button, to choose from <code>BTN_A, BTN_B, BTN_C, BTN_UP, BTN_RIGHT, BTN_DOWN, BTN_LEFT</code>
  
 
== Returns ==
 
== Returns ==

Latest revision as of 2014-05-20T21:05:13

Description

Function used to know when a given button is pressed.

Syntax

gb.buttons.pressed(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

  • boolean: true if the selected button is pressed

Example

See also