FabGL
ESP32 Display Controller and Graphics Library

◆ message()

InputResult message ( char const *  titleText,
char const *  messageText,
char const *  buttonCancelText = nullptr,
char const *  buttonOKText = "OK" 
)

Shows a dialog with just a label.

Parameters
titleTextOptional title of the dialog (nullptr = the dialogs hasn't a title)
messageTextMessage to show
buttonCancelTextOptional test for CANCEL button (nullptr = hasn't CANCEL button). Default is nullptr.
buttonOKTextOptional text for OK button (nullptr = hasn't OK button). Default is "OK".
Returns
Dialog box result (Cancel or Enter)

Example:

char wifiName[32];
char wifiPsw[32];
InputBox ib;
ib.begin();
if (ib.message("Network Configuration", "Configure WIFI network?", "No", "Yes") == InputResult::Enter) {
  ib.textInput("Network Configuration", "WiFi Name", wifiName, 31);
  ib.textInput("Network Configuration", "WiFi Password", wifiPsw, 31, "Cancel", "OK", true);
}
ib.end();

Definition at line 164 of file inputbox.cpp.