GUI: implement instrument preview in file dialog

SADLY it's just for the built-in file dialog
but i'll think of a solution for the external one
This commit is contained in:
tildearrow 2022-04-25 18:58:17 -05:00
parent 663e724111
commit e8c9b645c5
38 changed files with 113 additions and 85 deletions

View file

@ -4,7 +4,7 @@
#include "../../extern/pfd-fixed/portable-file-dialogs.h"
bool FurnaceGUIFileDialog::openLoad(String header, std::vector<String> filter, const char* noSysFilter, String path, double dpiScale) {
bool FurnaceGUIFileDialog::openLoad(String header, std::vector<String> filter, const char* noSysFilter, String path, double dpiScale, FileDialogSelectCallback clickCallback) {
if (opened) return false;
saving=false;
curPath=path;
@ -13,7 +13,7 @@ bool FurnaceGUIFileDialog::openLoad(String header, std::vector<String> filter, c
dialogO=new pfd::open_file(header,path,filter);
} else {
ImGuiFileDialog::Instance()->DpiScale=dpiScale;
ImGuiFileDialog::Instance()->OpenModal("FileDialog",header,noSysFilter,path);
ImGuiFileDialog::Instance()->OpenModal("FileDialog",header,noSysFilter,path,1,nullptr,0,clickCallback);
}
opened=true;
return true;