Update the FileDialog API, improve
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define LIME_UI_FILE_DIALOG_H
|
||||
|
||||
|
||||
#include <utils/QuickVec.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -13,7 +13,7 @@ namespace lime {
|
||||
public:
|
||||
|
||||
static const char* OpenFile (const char* filter = NULL, const char* defaultPath = NULL);
|
||||
static void OpenFiles (QuickVec<const char*>* files, const char* filter = NULL, const char* defaultPath = NULL);
|
||||
static void OpenFiles (std::vector<const char*>* files, const char* filter = NULL, const char* defaultPath = NULL);
|
||||
static const char* SaveFile (const char* filter = NULL, const char* defaultPath = NULL);
|
||||
|
||||
};
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace lime {
|
||||
value lime_file_dialog_open_files (value filter, value defaultPath) {
|
||||
|
||||
#ifdef LIME_NFD
|
||||
QuickVec<const char*> files;
|
||||
std::vector<const char*> files;
|
||||
|
||||
FileDialog::OpenFiles (&files, val_string (filter), val_string (defaultPath));
|
||||
value result = alloc_array (files.size ());
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace lime {
|
||||
}
|
||||
|
||||
|
||||
void FileDialog::OpenFiles (QuickVec<const char*>* files, const char* filter, const char* defaultPath) {
|
||||
void FileDialog::OpenFiles (std::vector<const char*>* files, const char* filter, const char* defaultPath) {
|
||||
|
||||
nfdpathset_t pathSet;
|
||||
nfdresult_t result = NFD_OpenDialogMultiple (filter, defaultPath, &pathSet);
|
||||
|
||||
Reference in New Issue
Block a user