Open documents in one of three ways instead of two bools, and let dialogs know when they take many files
DocumentOpen (open, new, or restored from an autosave) replaces isNew and isRecent and Manager::new_. The *_OPEN dialogs pick several files without being told.
This commit is contained in:
1 parent
1fc6b064ae
commit
228a15b5b3
13 files changed
+36
-31
No files matched your search
+4
-2
@@ -42,14 +42,16 @@ Dialog::Dialog(SDL_Window* window)
|
||||
this->window = window;
|
||||
}
|
||||
|
||||
void Dialog::file_open(Type type, bool isMany)
|
||||
// The *_OPEN dialogs pick any number of files. The others pick one.
|
||||
void Dialog::file_open(Type type)
|
||||
{
|
||||
if (type == Dialog::NONE)
|
||||
return;
|
||||
path.clear();
|
||||
paths.clear();
|
||||
SDL_ShowOpenFileDialog(callback, this, window, FILTERS[TYPE_FILTERS[type]], std::size(FILTERS[TYPE_FILTERS[type]]),
|
||||
nullptr, isMany);
|
||||
nullptr,
|
||||
type == ANM2_OPEN || type == SOUND_OPEN || type == LIBRARY_OPEN || type == SPRITESHEET_OPEN);
|
||||
this->type = type;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user