|
FabGL
ESP32 Display Controller and Graphics Library
|
| InputResult fileSelector | ( | char const * | titleText, |
| char const * | messageText, | ||
| char * | inOutDirectory, | ||
| int | maxDirectoryLength, | ||
| char * | inOutFilename, | ||
| int | maxFilenameLength, | ||
| char const * | buttonCancelText = "Cancel", |
||
| char const * | buttonOKText = "OK" |
||
| ) |
Selects a file and directory starting from the specified path.
| titleText | Optional title of the dialog (nullptr = the dialogs hasn't a title) |
| messageText | Message to show |
| inOutDirectory | Starting directory as input, selected directory as output |
| maxDirectoryLength | Maximum length of directory buffer (not including ending zero) |
| inOutFilename | Initial filename as input, selected filename as output |
| maxFilenameLength | Maximum length of filename buffer (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". |
Example:
InputBox ib;
ib.begin();
if (FileBrowser::mountSDCard(false, "/SD")) {
char filename[16] = "";
char directory[32] = "/SD"
if (ib.fileSelector("File Select", "Filename: ", directory, sizeof(directory) - 1, filename, sizeof(filename) - 1) == InputResult::Enter)
ib.messageFmt("", nullptr, "OK", "Folder = %s, File = %s", directory, filename);
}
ib.end();
Definition at line 295 of file inputbox.cpp.