From a59ed84322577e8c25e5751c2a93f4f17f196c4e Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 6 Sep 2022 14:28:57 -0500 Subject: [PATCH] GUI: fix wave gen FM con checkboxes doing nothing --- src/gui/waveEdit.cpp | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/src/gui/waveEdit.cpp b/src/gui/waveEdit.cpp index 2767911a8..9842d808b 100644 --- a/src/gui/waveEdit.cpp +++ b/src/gui/waveEdit.cpp @@ -423,13 +423,21 @@ void FurnaceGUI::drawWaveEdit() { ImGui::TableNextColumn(); ImGui::Text("1"); ImGui::TableNextColumn(); - ImGui::Checkbox("##Con12",&waveGenFMCon1[0]); + if (ImGui::Checkbox("##Con12",&waveGenFMCon1[0])) { + doGenerateWave(); + } ImGui::TableNextColumn(); - ImGui::Checkbox("##Con13",&waveGenFMCon1[1]); + if (ImGui::Checkbox("##Con13",&waveGenFMCon1[1])) { + doGenerateWave(); + } ImGui::TableNextColumn(); - ImGui::Checkbox("##Con14",&waveGenFMCon1[2]); + if (ImGui::Checkbox("##Con14",&waveGenFMCon1[2])) { + doGenerateWave(); + } ImGui::TableNextColumn(); - ImGui::Checkbox("##Con1O",&waveGenFMCon1[3]); + if (ImGui::Checkbox("##Con1O",&waveGenFMCon1[3])) { + doGenerateWave(); + } ImGui::TableNextRow(); ImGui::TableNextColumn(); @@ -437,11 +445,17 @@ void FurnaceGUI::drawWaveEdit() { ImGui::TableNextColumn(); // blank ImGui::TableNextColumn(); - ImGui::Checkbox("##Con23",&waveGenFMCon2[0]); + if (ImGui::Checkbox("##Con23",&waveGenFMCon2[0])) { + doGenerateWave(); + } ImGui::TableNextColumn(); - ImGui::Checkbox("##Con24",&waveGenFMCon2[1]); + if (ImGui::Checkbox("##Con24",&waveGenFMCon2[1])) { + doGenerateWave(); + } ImGui::TableNextColumn(); - ImGui::Checkbox("##Con2O",&waveGenFMCon2[2]); + if (ImGui::Checkbox("##Con2O",&waveGenFMCon2[2])) { + doGenerateWave(); + } ImGui::TableNextRow(); ImGui::TableNextColumn(); @@ -451,9 +465,13 @@ void FurnaceGUI::drawWaveEdit() { ImGui::TableNextColumn(); // blank ImGui::TableNextColumn(); - ImGui::Checkbox("##Con34",&waveGenFMCon3[0]); + if (ImGui::Checkbox("##Con34",&waveGenFMCon3[0])) { + doGenerateWave(); + } ImGui::TableNextColumn(); - ImGui::Checkbox("##Con3O",&waveGenFMCon3[1]); + if (ImGui::Checkbox("##Con3O",&waveGenFMCon3[1])) { + doGenerateWave(); + } ImGui::EndTable(); }