i may have done
This commit is contained in:
parent
495a0e56e3
commit
71a9355a9e
|
|
@ -110,7 +110,7 @@ void FurnaceGUIFileDialog::convertFilterList(std::vector<String>& filter) {
|
||||||
strncpy(noSysFilter,result.c_str(),4095);
|
strncpy(noSysFilter,result.c_str(),4095);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FurnaceGUIFileDialog::openLoad(String header, std::vector<String> filter, String path, double dpiScale, FileDialogSelectCallback clickCallback, bool allowMultiple) {
|
bool FurnaceGUIFileDialog::openLoad(String header, std::vector<String> filter, String path, double dpiScale, FileDialogSelectCallback clickCallback, bool allowMultiple, String hint) {
|
||||||
if (opened) return false;
|
if (opened) return false;
|
||||||
saving=false;
|
saving=false;
|
||||||
curPath=path;
|
curPath=path;
|
||||||
|
|
@ -189,13 +189,13 @@ bool FurnaceGUIFileDialog::openLoad(String header, std::vector<String> filter, S
|
||||||
ImGuiFileDialog::Instance()->DpiScale=dpiScale;
|
ImGuiFileDialog::Instance()->DpiScale=dpiScale;
|
||||||
ImGuiFileDialog::Instance()->mobileMode=mobileUI;
|
ImGuiFileDialog::Instance()->mobileMode=mobileUI;
|
||||||
ImGuiFileDialog::Instance()->homePath=getHomeDir();
|
ImGuiFileDialog::Instance()->homePath=getHomeDir();
|
||||||
ImGuiFileDialog::Instance()->OpenModal("FileDialog",header,noSysFilter,path,allowMultiple?999:1,nullptr,0,clickCallback);
|
ImGuiFileDialog::Instance()->OpenModal("FileDialog",header,noSysFilter,path,hint,allowMultiple?999:1,nullptr,0,clickCallback);
|
||||||
}
|
}
|
||||||
opened=true;
|
opened=true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FurnaceGUIFileDialog::openSave(String header, std::vector<String> filter, String path, double dpiScale) {
|
bool FurnaceGUIFileDialog::openSave(String header, std::vector<String> filter, String path, double dpiScale, String hint) {
|
||||||
if (opened) return false;
|
if (opened) return false;
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
|
|
@ -275,7 +275,7 @@ bool FurnaceGUIFileDialog::openSave(String header, std::vector<String> filter, S
|
||||||
ImGuiFileDialog::Instance()->DpiScale=dpiScale;
|
ImGuiFileDialog::Instance()->DpiScale=dpiScale;
|
||||||
ImGuiFileDialog::Instance()->mobileMode=mobileUI;
|
ImGuiFileDialog::Instance()->mobileMode=mobileUI;
|
||||||
ImGuiFileDialog::Instance()->homePath=getHomeDir();
|
ImGuiFileDialog::Instance()->homePath=getHomeDir();
|
||||||
ImGuiFileDialog::Instance()->OpenModal("FileDialog",header,noSysFilter,path,1,nullptr,ImGuiFileDialogFlags_ConfirmOverwrite);
|
ImGuiFileDialog::Instance()->OpenModal("FileDialog",header,noSysFilter,path,hint,1,nullptr,ImGuiFileDialogFlags_ConfirmOverwrite);
|
||||||
}
|
}
|
||||||
opened=true;
|
opened=true;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@ class FurnaceGUIFileDialog {
|
||||||
void convertFilterList(std::vector<String>& filter);
|
void convertFilterList(std::vector<String>& filter);
|
||||||
public:
|
public:
|
||||||
bool mobileUI;
|
bool mobileUI;
|
||||||
bool openLoad(String header, std::vector<String> filter, String path, double dpiScale, FileDialogSelectCallback clickCallback=NULL, bool allowMultiple=false);
|
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);
|
bool openSave(String header, std::vector<String> filter, String path, double dpiScale, String hint="");
|
||||||
bool accepted();
|
bool accepted();
|
||||||
void close();
|
void close();
|
||||||
bool render(const ImVec2& min, const ImVec2& max);
|
bool render(const ImVec2& min, const ImVec2& max);
|
||||||
|
|
|
||||||
|
|
@ -1649,7 +1649,7 @@ void FurnaceGUI::openFileDialog(FurnaceGUIFileDialogs type) {
|
||||||
"Open File",
|
"Open File",
|
||||||
{"compatible files", "*.fur *.dmf *.mod *.fc13 *.fc14 *.smod *.fc *.ftm *.0cc *.dnm *.eft *.fub *.tfe",
|
{"compatible files", "*.fur *.dmf *.mod *.fc13 *.fc14 *.smod *.fc *.ftm *.0cc *.dnm *.eft *.fub *.tfe",
|
||||||
"all files", "*"},
|
"all files", "*"},
|
||||||
workingDirSong+"/CRAP",
|
workingDirSong,
|
||||||
dpiScale
|
dpiScale
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
@ -1756,7 +1756,8 @@ void FurnaceGUI::openFileDialog(FurnaceGUIFileDialogs type) {
|
||||||
"Save Instrument",
|
"Save Instrument",
|
||||||
{"Furnace instrument", "*.fui"},
|
{"Furnace instrument", "*.fui"},
|
||||||
workingDirIns,
|
workingDirIns,
|
||||||
dpiScale
|
dpiScale,
|
||||||
|
(settings.autoFillSave)?e->getIns(curIns)->name:""
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case GUI_FILE_INS_SAVE_DMP:
|
case GUI_FILE_INS_SAVE_DMP:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue