i may have done

This commit is contained in:
tildearrow 2024-05-24 03:51:35 -05:00
parent 495a0e56e3
commit 71a9355a9e
3 changed files with 9 additions and 8 deletions

View file

@ -110,7 +110,7 @@ void FurnaceGUIFileDialog::convertFilterList(std::vector<String>& filter) {
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;
saving=false;
curPath=path;
@ -189,13 +189,13 @@ bool FurnaceGUIFileDialog::openLoad(String header, std::vector<String> filter, S
ImGuiFileDialog::Instance()->DpiScale=dpiScale;
ImGuiFileDialog::Instance()->mobileMode=mobileUI;
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;
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;
#ifdef ANDROID
@ -275,7 +275,7 @@ bool FurnaceGUIFileDialog::openSave(String header, std::vector<String> filter, S
ImGuiFileDialog::Instance()->DpiScale=dpiScale;
ImGuiFileDialog::Instance()->mobileMode=mobileUI;
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;
return true;

View file

@ -51,8 +51,8 @@ class FurnaceGUIFileDialog {
void convertFilterList(std::vector<String>& filter);
public:
bool mobileUI;
bool openLoad(String header, std::vector<String> filter, String path, double dpiScale, FileDialogSelectCallback clickCallback=NULL, bool allowMultiple=false);
bool openSave(String header, std::vector<String> filter, String path, double dpiScale);
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 accepted();
void close();
bool render(const ImVec2& min, const ImVec2& max);

View file

@ -1649,7 +1649,7 @@ void FurnaceGUI::openFileDialog(FurnaceGUIFileDialogs type) {
"Open File",
{"compatible files", "*.fur *.dmf *.mod *.fc13 *.fc14 *.smod *.fc *.ftm *.0cc *.dnm *.eft *.fub *.tfe",
"all files", "*"},
workingDirSong+"/CRAP",
workingDirSong,
dpiScale
);
break;
@ -1756,7 +1756,8 @@ void FurnaceGUI::openFileDialog(FurnaceGUIFileDialogs type) {
"Save Instrument",
{"Furnace instrument", "*.fui"},
workingDirIns,
dpiScale
dpiScale,
(settings.autoFillSave)?e->getIns(curIns)->name:""
);
break;
case GUI_FILE_INS_SAVE_DMP: