FabGL
ESP32 Display Controller and Graphics Library

◆ messageFmt()

InputResult messageFmt ( char const *  titleText,
char const *  buttonCancelText,
char const *  buttonOKText,
const char *  format,
  ... 
)

Shows a dialog with a just a label. Allows printf like formatted text.

Parameters
titleTextOptional title of the dialog (nullptr = the dialogs hasn't a title)
buttonCancelTextOptional test for CANCEL button (nullptr = hasn't CANCEL button)
buttonOKTextOptional text for OK button (nullptr = hasn't OK button)
formatprintf like format string
...printf like parameters
Returns
Dialog box result (Cancel or Enter)

Example:

InputBox ib;
ib.begin();
for (int i = 0; i < 3; ++i)
  if (ib.messageFmt(nullptr, "Abort", "Continue", "Iteration number %d of 3", i) == InputResult::Cancel)
   break;
ib.end();

Definition at line 179 of file inputbox.cpp.