diff --git a/src/gui/doAction.cpp b/src/gui/doAction.cpp index 73d3876e7..645c684d2 100644 --- a/src/gui/doAction.cpp +++ b/src/gui/doAction.cpp @@ -66,6 +66,7 @@ void FurnaceGUI::doAction(int what) { openFileDialog(GUI_FILE_SAVE); break; case GUI_ACTION_EXPORT: + curExportType=-1; displayExport=true; break; case GUI_ACTION_UNDO: diff --git a/src/gui/editControls.cpp b/src/gui/editControls.cpp index b9b8a7409..1ce85020d 100644 --- a/src/gui/editControls.cpp +++ b/src/gui/editControls.cpp @@ -519,24 +519,8 @@ void FurnaceGUI::drawMobileControls() { openFileDialog(GUI_FILE_SAVE_DMF_LEGACY); } ImGui::SameLine(); - if (ImGui::Button("Export Audio")) { - openFileDialog(GUI_FILE_EXPORT_AUDIO_ONE); - } - ImGui::SameLine(); - if (ImGui::Button("Export VGM")) { - openFileDialog(GUI_FILE_EXPORT_VGM); - } - - if (ImGui::Button("CmdStream")) { - openFileDialog(GUI_FILE_EXPORT_CMDSTREAM_BINARY); - } - ImGui::SameLine(); - if (ImGui::Button("CmdStream Text")) { - openFileDialog(GUI_FILE_EXPORT_CMDSTREAM); - } - ImGui::SameLine(); - if (ImGui::Button("Text")) { - openFileDialog(GUI_FILE_EXPORT_TEXT); + if (ImGui::Button("Export")) { + doAction(GUI_ACTION_EXPORT); } if (ImGui::Button("Restore Backup")) { diff --git a/src/gui/exportOptions.cpp b/src/gui/exportOptions.cpp index d5765fe2b..dc0af0c28 100644 --- a/src/gui/exportOptions.cpp +++ b/src/gui/exportOptions.cpp @@ -223,7 +223,7 @@ void FurnaceGUI::drawExport() { ImVec2 avail=ImGui::GetContentRegionAvail(); avail.y-=ImGui::GetFrameHeightWithSpacing(); - if (ImGui::BeginChild("sysPickerC",avail,false,ImGuiWindowFlags_NoScrollWithMouse|ImGuiWindowFlags_NoScrollbar)) { + if (ImGui::BeginChild("sysPickerC",avail,false)) { if (ImGui::BeginTabBar("ExportTypes")) { if (ImGui::BeginTabItem("Audio")) { drawExportAudio(); diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 8ab1abd9b..5a7d77fca 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -4101,7 +4101,7 @@ bool FurnaceGUI::loop() { openFileDialog(GUI_FILE_SAVE_DMF_LEGACY); } ImGui::Separator(); - if (settings.exportOptionsLayout) { + if (settings.exportOptionsLayout==0) { if (ImGui::BeginMenu("export audio...")) { drawExportAudio(); ImGui::EndMenu(); @@ -4114,7 +4114,7 @@ bool FurnaceGUI::loop() { for (int i=0; isong.systemLen; i++) { if ((e->song.system[i]==DIV_SYSTEM_VERA) || (e->song.system[i]==DIV_SYSTEM_YM2151)) numZSMCompat++; } - if (numZSMCompat > 0) { + if (numZSMCompat>0) { if (ImGui::BeginMenu("export ZSM...")) { drawExportZSM(); ImGui::EndMenu(); @@ -4138,6 +4138,8 @@ bool FurnaceGUI::loop() { drawExportCommand(); ImGui::EndMenu(); } + } else if (settings.exportOptionsLayout==2) { + } else { if (ImGui::MenuItem("export...",BIND_FOR(GUI_ACTION_EXPORT))) { displayExport=true; @@ -7594,7 +7596,8 @@ FurnaceGUI::FurnaceGUI(): introStopped(false), curTutorial(-1), curTutorialStep(0), - audioExportType(0) { + audioExportType(0), + curExportType(-1) { // value keys valueKeys[SDLK_0]=0; valueKeys[SDLK_1]=1; diff --git a/src/gui/gui.h b/src/gui/gui.h index 9b35b4f23..7e1c26379 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -2334,8 +2334,9 @@ class FurnaceGUI { // tutorial int curTutorial, curTutorialStep; - // audio export types (export options) + // export options int audioExportType; + int curExportType; void drawExportAudio(); void drawExportVGM(); diff --git a/src/gui/guiConst.cpp b/src/gui/guiConst.cpp index b3824e360..b2417761b 100644 --- a/src/gui/guiConst.cpp +++ b/src/gui/guiConst.cpp @@ -537,7 +537,7 @@ const FurnaceGUIActionDef guiActions[GUI_ACTION_MAX]={ D("OPEN_BACKUP", "Restore backup", 0), D("SAVE", "Save file", FURKMOD_CMD|SDLK_s), D("SAVE_AS", "Save as", FURKMOD_CMD|FURKMOD_SHIFT|SDLK_s), - D("EXPORT", "Export", FURKMOD_CMD|SDLK_e), + D("EXPORT", "Export", 0), D("UNDO", "Undo", FURKMOD_CMD|SDLK_z), #ifdef __APPLE__ D("REDO", "Redo", FURKMOD_CMD|FURKMOD_SHIFT|SDLK_z), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 8cc0d6b73..86fdcd826 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -2661,6 +2661,7 @@ void FurnaceGUI::drawSettings() { ImGui::Unindent(); ImGui::Text("Export options layout:"); + ImGui::Indent(); if (ImGui::RadioButton("Sub-menus in File menu##eol0",settings.exportOptionsLayout==0)) { settings.exportOptionsLayout=0; settingsChanged=true; @@ -2673,6 +2674,7 @@ void FurnaceGUI::drawSettings() { settings.exportOptionsLayout=2; settingsChanged=true; } + ImGui::Unindent(); bool capitalMenuBarB=settings.capitalMenuBar; if (ImGui::Checkbox("Capitalize menu bar",&capitalMenuBarB)) {