GUI: chord input

looks like a horrid hack, but it works
I'll improve some of the code at some point
This commit is contained in:
tildearrow 2025-10-31 05:03:58 -05:00
parent e8aeb45a12
commit 08a27be76f
5 changed files with 165 additions and 18 deletions

View file

@ -759,8 +759,18 @@ void FurnaceGUI::drawEditControls() {
ImGui::SameLine();
pushToggleColors(noteInputPoly);
if (ImGui::Button(noteInputPoly?(_("Poly##PolyInput")):(_("Mono##PolyInput")))) {
noteInputPoly=!noteInputPoly;
if (ImGui::Button(noteInputPoly?(noteInputChord?(_("Chord##PolyInput")):(_("Poly##PolyInput"))):(_("Mono##PolyInput")))) {
if (noteInputPoly) {
if (noteInputChord) {
noteInputPoly=false;
noteInputChord=false;
} else {
noteInputChord=true;
}
} else {
noteInputPoly=true;
noteInputChord=false;
}
e->setAutoNotePoly(noteInputPoly);
}
if (ImGui::IsItemHovered()) {
@ -889,8 +899,18 @@ void FurnaceGUI::drawEditControls() {
ImGui::SameLine();
pushToggleColors(noteInputPoly);
if (ImGui::Button(noteInputPoly?_("Poly##PolyInput"):_("Mono##PolyInput"))) {
noteInputPoly=!noteInputPoly;
if (ImGui::Button(noteInputPoly?(noteInputChord?(_("Chord##PolyInput")):(_("Poly##PolyInput"))):(_("Mono##PolyInput")))) {
if (noteInputPoly) {
if (noteInputChord) {
noteInputPoly=false;
noteInputChord=false;
} else {
noteInputChord=true;
}
} else {
noteInputPoly=true;
noteInputChord=false;
}
e->setAutoNotePoly(noteInputPoly);
}
if (ImGui::IsItemHovered()) {
@ -1027,8 +1047,18 @@ void FurnaceGUI::drawEditControls() {
popToggleColors();
pushToggleColors(noteInputPoly);
if (ImGui::Button(noteInputPoly?_("Poly##PolyInput"):_("Mono##PolyInput"))) {
noteInputPoly=!noteInputPoly;
if (ImGui::Button(noteInputPoly?(noteInputChord?(_("Chord##PolyInput")):(_("Poly##PolyInput"))):(_("Mono##PolyInput")))) {
if (noteInputPoly) {
if (noteInputChord) {
noteInputPoly=false;
noteInputChord=false;
} else {
noteInputChord=true;
}
} else {
noteInputPoly=true;
noteInputChord=false;
}
e->setAutoNotePoly(noteInputPoly);
}
if (ImGui::IsItemHovered()) {
@ -1127,8 +1157,18 @@ void FurnaceGUI::drawEditControls() {
ImGui::SameLine();
pushToggleColors(noteInputPoly);
if (ImGui::Button(noteInputPoly?_("Poly##PolyInput"):_("Mono##PolyInput"))) {
noteInputPoly=!noteInputPoly;
if (ImGui::Button(noteInputPoly?(noteInputChord?(_("Chord##PolyInput")):(_("Poly##PolyInput"))):(_("Mono##PolyInput")))) {
if (noteInputPoly) {
if (noteInputChord) {
noteInputPoly=false;
noteInputChord=false;
} else {
noteInputChord=true;
}
} else {
noteInputPoly=true;
noteInputChord=false;
}
e->setAutoNotePoly(noteInputPoly);
}
if (ImGui::IsItemHovered()) {