ughhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

This commit is contained in:
Eknous-P 2024-10-14 14:46:04 +04:00 committed by tildearrow
parent 17da58c0ca
commit 44077332b5

View file

@ -912,24 +912,41 @@ void FurnaceGUI::drawFindReplace() {
snprintf(tempID,1024,"???");
queryReplaceNote=0;
}
if (ImGui::BeginCombo("##NRValueC",tempID)) {
for (int j=0; j<180; j++) {
snprintf(tempID,1024,"%s",noteNames[j]);
if (ImGui::Selectable(tempID,queryReplaceNote==(j-60))) {
queryReplaceNote=j-60;
bool updateNote=false;
int note1=queryReplaceNote%12;
int oct1=queryReplaceNote/12;
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x/2);
if (ImGui::BeginCombo("##NN1",tempID)) {
for (int i=0; i<12; i++) {
snprintf(tempID,1024,"%c%c",noteNames[i+72][0],(noteNames[i+72][1]=='-')?' ':noteNames[i+72][1]);
if (ImGui::Selectable(tempID,note1==i)) {
note1=i;
updateNote=true;
}
}
if (ImGui::Selectable(noteOffLabel,queryReplaceNote==128)) {
if (ImGui::Selectable(noteOffLabel,note1==13)) {
queryReplaceNote=128;
}
if (ImGui::Selectable(noteRelLabel,queryReplaceNote==129)) {
if (ImGui::Selectable(noteRelLabel,note1==14)) {
queryReplaceNote=129;
}
if (ImGui::Selectable(macroRelLabel,queryReplaceNote==130)) {
if (ImGui::Selectable(macroRelLabel,note1==15)) {
queryReplaceNote=130;
}
ImGui::EndCombo();
}
ImGui::SameLine();
if (queryReplaceNote<128) {
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x/2);
if (ImGui::InputScalar("##NNO1",ImGuiDataType_S32,&oct1)) {
if (oct1<-5) oct1=-5;
if (oct1>9) oct1=9;
updateNote=true;
}
}
if (updateNote) {
queryReplaceNote=oct1*12+note1;
}
} else if (queryReplaceNoteMode==GUI_QUERY_REPLACE_ADD || queryReplaceNoteMode==GUI_QUERY_REPLACE_ADD_OVERFLOW) {
if (ImGui::InputInt("##NRValue",&queryReplaceNote,1,12)) {
if (queryReplaceNote<-180) queryReplaceNote=-180;