prepare for config import/export/reset

This commit is contained in:
tildearrow 2024-05-17 12:45:31 -05:00
parent bc11f983ee
commit 724632e2a3
3 changed files with 26 additions and 0 deletions

View file

@ -6015,6 +6015,16 @@ bool FurnaceGUI::loop() {
ImGui::CloseCurrentPopup();
}
break;
case GUI_WARN_RESET_CONFIG:
if (ImGui::Button("Yes")) {
quit=true;
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("No")) {
ImGui::CloseCurrentPopup();
}
break;
case GUI_WARN_GENERIC:
if (ImGui::Button("OK")) {
ImGui::CloseCurrentPopup();

View file

@ -632,6 +632,7 @@ enum FurnaceGUIWarnings {
GUI_WARN_SYSTEM_DEL,
GUI_WARN_CLEAR_HISTORY,
GUI_WARN_CV,
GUI_WARN_RESET_CONFIG,
GUI_WARN_GENERIC
};

View file

@ -980,6 +980,21 @@ void FurnaceGUI::drawSettings() {
settingsChanged=true;
}
// SUBSECTION CONFIGURATION
CONFIG_SUBSECTION("Configuration");
if (ImGui::Button("Import")) {
openFileDialog(GUI_FILE_IMPORT_CONFIG);
}
ImGui::SameLine();
if (ImGui::Button("Export")) {
openFileDialog(GUI_FILE_EXPORT_CONFIG);
}
pushDestColor();
if (ImGui::Button("Factory Reset")) {
showWarning("Are you sure you want to reset all Furnace settings?\nYou must restart Furnace after doing so.",GUI_WARN_RESET_CONFIG);
}
popDestColor();
END_SECTION;
}
CONFIG_SECTION("Audio") {