From 9e080956ec692aa7685feb7b0d06ea7a26666e21 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 8 Mar 2022 18:26:41 -0500 Subject: [PATCH] prepare to add a right click menu to pattern DO NOT USE IF YOU WANT TO SOLO CHANNELS - I'LL FIX IT when I come back --- src/gui/pattern.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/gui/pattern.cpp b/src/gui/pattern.cpp index 2eabcd04b..20f8975f5 100644 --- a/src/gui/pattern.cpp +++ b/src/gui/pattern.cpp @@ -807,6 +807,24 @@ void FurnaceGUI::drawPattern() { ImGui::PopFont(); } ImGui::PopStyleVar(); + if (patternOpen) if (ImGui::BeginPopupContextItem("furnace quit unexpectedly.")) { + char id[4096]; + ImGui::Selectable("cut"); + ImGui::Selectable("copy"); + ImGui::Selectable("paste"); + if (ImGui::BeginMenu("change instrument...")) { + if (e->song.ins.empty()) { + ImGui::Text("no instruments available"); + } + for (size_t i=0; isong.ins.size(); i++) { + snprintf(id,4095,"%.2lX: %s",i,e->song.ins[i]->name.c_str()); + if (ImGui::Selectable(id)) { // TODO + } + } + ImGui::EndMenu(); + } + ImGui::EndPopup(); + } if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_PATTERN; ImGui::End(); }