gb.gui.popup

Description

// strings:
void gb.gui.popup( const char* text , uint8_t duration )
// Multilang:
void gb.gui.popup( const MultiLang* text , uint8_t duration [, uint8_t numLang] )

gb.gui.popup displays a popup for duration frames. Please note that the popup only functions correctly if, during the entirety of its display time, the entire screen is been re-drawn each frame.

Parameters

  • const char* | const MultiLang* text: text content of the popup
  • uint8_t duration: Duration the popup is displayed (in frames)
  • uint8_t numLang (optional): number language entries for MultiLang text. If not provided, it is attempted to autodetermine it

Returns

none

Example

#include <Gamebuino-Meta.h>

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

const MultiLang fox[] = {   {LANG_EN, "Fox"},   {LANG_DE, "Fuchs"}, };

void loop() {   while(!gb.update());   gb.display.fill(RED);

  if (gb.buttons.pressed(BUTTON_A)) {     gb.gui.popup(fox, 50);   } }