gb.buttons.released

Description

bool gb.buttons.released( Button button )

gb.buttons.released returns true if the button has been released just now, else false.

Parameters

  • Button button: the button to check

Returns

bool: true if the button was released just now

Example

#include <Gamebuino-Meta.h>

void setup() {
  gb.begin();
}

void loop() {
  while(!gb.update());
  // check if the A button was released
  if (gb.buttons.released(BUTTON_A)) {
    // The button was released, handle it
  }
}