GUI: prepare for multiple asset load
This commit is contained in:
parent
6216e286f8
commit
81a2bce4d4
8
extern/igfd/ImGuiFileDialog.cpp
vendored
8
extern/igfd/ImGuiFileDialog.cpp
vendored
|
@ -3993,7 +3993,13 @@ namespace IGFD
|
||||||
} else {
|
} else {
|
||||||
fdi.SelectFileName(prFileDialogInternal, vInfos);
|
fdi.SelectFileName(prFileDialogInternal, vInfos);
|
||||||
if (prFileDialogInternal.puDLGselFun!=NULL) {
|
if (prFileDialogInternal.puDLGselFun!=NULL) {
|
||||||
prFileDialogInternal.puDLGselFun(GetFilePathName().c_str());
|
std::string argPath;
|
||||||
|
for (auto& i: GetSelection()) {
|
||||||
|
argPath=i.second;
|
||||||
|
}
|
||||||
|
if (!argPath.empty()) {
|
||||||
|
prFileDialogInternal.puDLGselFun(argPath.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1759,7 +1759,14 @@ void FurnaceGUI::openFileDialog(FurnaceGUIFileDialogs type) {
|
||||||
"all files", ".*"},
|
"all files", ".*"},
|
||||||
"compatible files{.fur,.dmf,.mod},another option{.wav,.ttf},.*",
|
"compatible files{.fur,.dmf,.mod},another option{.wav,.ttf},.*",
|
||||||
workingDirTest,
|
workingDirTest,
|
||||||
dpiScale
|
dpiScale,
|
||||||
|
[](const char* path) {
|
||||||
|
if (path!=NULL) {
|
||||||
|
logI("Callback Result: %s",path);
|
||||||
|
} else {
|
||||||
|
logI("Callback Result: NULL");
|
||||||
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case GUI_FILE_TEST_OPEN_MULTI:
|
case GUI_FILE_TEST_OPEN_MULTI:
|
||||||
|
@ -1772,7 +1779,13 @@ void FurnaceGUI::openFileDialog(FurnaceGUIFileDialogs type) {
|
||||||
"compatible files{.fur,.dmf,.mod},another option{.wav,.ttf},.*",
|
"compatible files{.fur,.dmf,.mod},another option{.wav,.ttf},.*",
|
||||||
workingDirTest,
|
workingDirTest,
|
||||||
dpiScale,
|
dpiScale,
|
||||||
NULL,
|
[](const char* path) {
|
||||||
|
if (path!=NULL) {
|
||||||
|
logI("Callback Result: %s",path);
|
||||||
|
} else {
|
||||||
|
logI("Callback Result: NULL");
|
||||||
|
}
|
||||||
|
},
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue