Nameless Engine
|
#include <FileDialog.h>
Static Public Member Functions | |
static std::vector< std::filesystem::path > | openFile (const std::string &sTitle, const std::vector< std::pair< std::string, std::string > > &vFileTypeFilters={{"All Files", {"*"}}}, const std::filesystem::path &directory=std::filesystem::current_path(), bool bAllowSelectingMultipleFiles=false) |
static std::optional< std::filesystem::path > | saveFile (const std::string &sTitle, const std::pair< std::string, std::string > &fileType={"All Files", {"*"}}, const std::filesystem::path &directory=std::filesystem::current_path()) |
static std::optional< std::filesystem::path > | selectDirectory (const std::string &sTitle, const std::filesystem::path &directory=std::filesystem::current_path()) |
Various file dialog windows: open file, save file, select directory and etc.
|
static |
Shows "Open File" dialog window to allow the user to select file(s).
Example:
sTitle | Title of the dialog window. |
vFileTypeFilters | Filter that determines which types of files can be selected. Each pair contains filter name and space separated types. |
directory | Starting directory to show. |
bAllowSelectingMultipleFiles | Whether to allow selecting multiple files or not. |
|
static |
Shows "Save File" dialog window to ask the user where to save a file.
Example:
sTitle | Title of the dialog window. |
fileType | A pair of "Name of the file type" and "file extension". |
directory | Starting directory to show. |
|
static |
Shows "Select Directory" dialog window to ask the user to select a directory.
sTitle | Title of the dialog window. |
directory | Starting directory to show. |