GUI: prepare to add "save all assets" options
This commit is contained in:
parent
8e50c8d618
commit
9d77522efb
7 changed files with 183 additions and 19 deletions
|
|
@ -21,6 +21,7 @@
|
|||
namespace pfd {
|
||||
class open_file;
|
||||
class save_file;
|
||||
class select_folder;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -29,7 +30,7 @@ typedef std::function<void(const char*)> FileDialogSelectCallback;
|
|||
class FurnaceGUIFileDialog {
|
||||
bool sysDialog;
|
||||
bool opened;
|
||||
bool saving;
|
||||
unsigned char dialogType;
|
||||
bool hasError;
|
||||
char noSysFilter[4096];
|
||||
String curPath;
|
||||
|
|
@ -37,15 +38,18 @@ class FurnaceGUIFileDialog {
|
|||
#ifdef USE_NFD
|
||||
std::thread* dialogO;
|
||||
std::thread* dialogS;
|
||||
std::thread* dialogF;
|
||||
std::atomic<bool> dialogOK;
|
||||
std::vector<String> nfdResult;
|
||||
#elif defined(ANDROID)
|
||||
JNIEnv* jniEnv;
|
||||
void* dialogO;
|
||||
void* dialogS;
|
||||
void* dialogF;
|
||||
#else
|
||||
pfd::open_file* dialogO;
|
||||
pfd::save_file* dialogS;
|
||||
pfd::select_folder* dialogF;
|
||||
#endif
|
||||
|
||||
void convertFilterList(std::vector<String>& filter);
|
||||
|
|
@ -53,6 +57,7 @@ class FurnaceGUIFileDialog {
|
|||
bool mobileUI;
|
||||
bool openLoad(String header, std::vector<String> filter, String path, double dpiScale, FileDialogSelectCallback clickCallback=NULL, bool allowMultiple=false, String hint="");
|
||||
bool openSave(String header, std::vector<String> filter, String path, double dpiScale, String hint="");
|
||||
bool openSelectDir(String header, String path, double dpiScale, String hint="");
|
||||
bool accepted();
|
||||
void close();
|
||||
bool render(const ImVec2& min, const ImVec2& max);
|
||||
|
|
@ -63,7 +68,7 @@ class FurnaceGUIFileDialog {
|
|||
explicit FurnaceGUIFileDialog(bool system):
|
||||
sysDialog(system),
|
||||
opened(false),
|
||||
saving(false),
|
||||
dialogType(0),
|
||||
hasError(false),
|
||||
#ifdef ANDROID
|
||||
jniEnv(NULL),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue