prepare for a clear option

This commit is contained in:
tildearrow 2022-04-24 16:57:58 -05:00
parent bb4bc01778
commit e414056f2d
2 changed files with 30 additions and 2 deletions

View file

@ -2711,8 +2711,10 @@ bool FurnaceGUI::loop() {
if (ImGui::MenuItem("redo",BIND_FOR(GUI_ACTION_REDO))) doRedo();
ImGui::Separator();
editOptions(true);
/*ImGui::Separator();
ImGui::MenuItem("clear...");*/
ImGui::Separator();
if (ImGui::MenuItem("clear...")) {
showWarning("Are you sure you want to clear...",GUI_WARN_CLEAR);
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("settings")) {
@ -3370,6 +3372,31 @@ bool FurnaceGUI::loop() {
ImGui::CloseCurrentPopup();
}
break;
case GUI_WARN_CLEAR:
if (ImGui::Button("Song (orders and patterns)")) {
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("Pattern")) {
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("Instruments")) {
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("Wavetables")) {
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("Samples")) {
ImGui::CloseCurrentPopup();
}
if (ImGui::Button("Wait! What am I doing?")) {
ImGui::CloseCurrentPopup();
}
break;
case GUI_WARN_GENERIC:
if (ImGui::Button("OK")) {
ImGui::CloseCurrentPopup();

View file

@ -264,6 +264,7 @@ enum FurnaceGUIWarnings {
GUI_WARN_RESET_COLORS,
GUI_WARN_RESET_KEYBINDS,
GUI_WARN_CLOSE_SETTINGS,
GUI_WARN_CLEAR,
GUI_WARN_GENERIC
};