respect my formatting style
This commit is contained in:
tildearrow 2023-08-03 21:32:57 -05:00
parent cf1f741769
commit 358118f1f9

View file

@ -157,7 +157,7 @@ void FurnaceGUI::drawChanOsc() {
ImGui::Text("Automatic columns"); ImGui::Text("Automatic columns");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
const char* previewColType = autoColsTypes[chanOscAutoColsType&3]; const char* previewColType=autoColsTypes[chanOscAutoColsType&3];
if (ImGui::BeginCombo("##AutoCols",previewColType)) { if (ImGui::BeginCombo("##AutoCols",previewColType)) {
for (int j=0; j<4; j++) { for (int j=0; j<4; j++) {
const bool isSelected=(chanOscAutoColsType==j); const bool isSelected=(chanOscAutoColsType==j);
@ -367,11 +367,20 @@ void FurnaceGUI::drawChanOsc() {
} }
} }
// 0: none
// 1: sqrt(chans)
// 2: sqrt(chans+1)
// 3: sqrt(chans)+1
switch (chanOscAutoColsType) { switch (chanOscAutoColsType) {
case 1: chanOscCols=sqrt(oscChans.size()); break; case 1:
case 2: chanOscCols=sqrt(oscChans.size()+1); break; chanOscCols=sqrt(oscChans.size());
case 3: chanOscCols=sqrt(oscChans.size())+1; break; break;
default: break; case 2:
chanOscCols=sqrt(oscChans.size()+1);
break;
case 3:
chanOscCols=sqrt(oscChans.size())+1;
break;
} }
if (chanOscCols<1) chanOscCols=1; if (chanOscCols<1) chanOscCols=1;
if (chanOscCols>64) chanOscCols=64; if (chanOscCols>64) chanOscCols=64;