GUI: prepare to add "save all assets" options

This commit is contained in:
tildearrow 2024-07-27 04:35:21 -05:00
parent 8e50c8d618
commit 9d77522efb
7 changed files with 183 additions and 19 deletions

View file

@ -781,8 +781,14 @@ void FurnaceGUI::doAction(int what) {
case GUI_ACTION_INS_LIST_DIR_VIEW:
insListDir=!insListDir;
break;
case GUI_ACTION_INS_LIST_SAVE_ALL:
if (e->song.ins.empty()) {
showError(_("this song doesn't have any instruments."));
} else {
openFileDialog(GUI_FILE_INS_SAVE_ALL);
}
break;
case GUI_ACTION_WAVE_LIST_ADD: {
std::vector<DivSystem> alreadyDone;
waveSizeList.clear();
@ -902,6 +908,13 @@ void FurnaceGUI::doAction(int what) {
case GUI_ACTION_WAVE_LIST_DIR_VIEW:
waveListDir=!waveListDir;
break;
case GUI_ACTION_WAVE_LIST_SAVE_ALL:
if (e->song.wave.empty()) {
showError(_("this song doesn't have any wavetables."));
} else {
openFileDialog(GUI_FILE_WAVE_SAVE_ALL);
}
break;
case GUI_ACTION_SAMPLE_LIST_ADD:
curSample=e->addSample();
@ -1056,6 +1069,13 @@ void FurnaceGUI::doAction(int what) {
displayInsTypeListMakeInsSample=-2;
break;
}
case GUI_ACTION_SAMPLE_LIST_SAVE_ALL:
if (e->song.sample.empty()) {
showError(_("this song doesn't have any samples."));
} else {
openFileDialog(GUI_FILE_SAMPLE_SAVE_ALL);
}
break;
case GUI_ACTION_SAMPLE_SELECT:
if (curSample<0 || curSample>=(int)e->song.sample.size()) break;