FabGL
ESP32 Display Controller and Graphics Library
|
InputResult textInput | ( | char const * | titleText, |
char const * | labelText, | ||
char * | inOutString, | ||
int | maxLength, | ||
char const * | buttonCancelText = "Cancel" , |
||
char const * | buttonOKText = "OK" , |
||
bool | passwordMode = false |
||
) |
Shows a dialog with a label and a text edit box.
titleText | Optional title of the dialog (nullptr = the dialogs hasn't a title) |
labelText | Label text |
inOutString | This is the input and output edit box string |
maxLength | Maximum length of the edit box string (not including ending zero) |
buttonCancelText | Optional text for CANCEL button (nullptr = hasn't CANCEL button). Default is "Cancel". |
buttonOKText | Optional text for OK button (nullptr = hasn't OK button). Default is "OK". |
passwordMode | Optional password mode. If True all characters are shown using "*". Default is false. |
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 146 of file inputbox.cpp.