//////////////////////////////////////////////////////////////////////////////////////////////////// General TFE tries to keep paths consistently using forward slashes for readability, consistency and generally they work equally well on Linux, Mac and Windows. //////////////////////////////////////////////////////////////////////////////////////////////////// However* some specific APIs (usually o
| 116 | // and restrict the ugliness to as small an area as possible. |
| 117 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 118 | FileResult openFileDialog(const char* title, const char* initPath, std::vector<std::string> const &filters/* = { "All Files", "*" }*/, bool multiSelect/* = false*/) |
| 119 | { |
| 120 | char initPathOS[TFE_MAX_PATH] = ""; |
| 121 | if (initPath) |
| 122 | { |
| 123 | FileUtil::convertToOSPath(initPath, initPathOS); |
| 124 | } |
| 125 | |
| 126 | return pfd::open_file(title, initPathOS, filters, multiSelect ? pfd::opt::multiselect : pfd::opt::none).result(); |
| 127 | } |
| 128 | |
| 129 | FileResult directorySelectDialog(const char* title, const char* initPath, bool forceInitPath/* = false*/) |
| 130 | { |