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
This commit is contained in:
tildearrow 2022-03-08 18:26:41 -05:00
parent 698b8e960f
commit 9e080956ec

View file

@ -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; i<e->song.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();
}