global functions
ofSystemAlertDialog(...)
void ofSystemAlertDialog(string errorMessage)
Documentation from code comments
show an error message in an alert dialog box
ofSystemLoadDialog(...)
ofFileDialogResult ofSystemLoadDialog(string windowTitle, bool bFolderSelection=false, string defaultPath)
ofFileDialogResult result = ofSystemLoadDialog("Load file");
if(result.bSuccess) {
string path = result.getPath();
// load your file at `path`
}
See also: ofFileDialogResult.
Documentation from code comments
show a file load dialog box
Parameters:
windowTitle optional window title string, ie. "Load background image"
bFolderSelection set to true to allow folder selection
defaultPath optional default directory path to start the dialog in, ie. ofFilePath::getUserHomeDir() \return dialog result with selection (if any)
ofSystemSaveDialog(...)
ofFileDialogResult ofSystemSaveDialog(string defaultName, string messageName)
ofFileDialogResult result = ofSystemSaveDialog("default.jpg", "Save");
if(result.bSuccess) {
string path = result.getPath();
// save your file to `path`
}
See also: ofFileDialogResult.
Documentation from code comments
show a file save dialog box
Parameters:
defaultName suggested filename to start dialog, ie "screenshot.png"
messageName descriptive text for the save action, ie. "Saving screenshot as" \return dialog result with selection (if any)
ofSystemTextBoxDialog(...)
string ofSystemTextBoxDialog(string question, string text)
Documentation from code comments
show a text entry dialog box
Parameters:
question descriptive text for the text entry, ie. "What's your favorite color?"
text optional default text entry string, ie. "blue"
Last updated 星期二, 19 十一月 2024 17:26:26 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue