auto column types begone
what was i thinking???
This commit is contained in:
parent
b5fc6ff39d
commit
ae4476bd7f
3 changed files with 15 additions and 37 deletions
|
|
@ -77,7 +77,7 @@ float FurnaceGUI::computeGradPos(int type, int chan, int totalChans) {
|
|||
return (float)chan/(float)(totalChans-1);
|
||||
break;
|
||||
case GUI_OSCREF_BRIGHT:
|
||||
return chanOscBright[chan];
|
||||
return chanOscBright[chan]; // this array is set to only 0 (???)
|
||||
break;
|
||||
case GUI_OSCREF_NOTE_TRIGGER:
|
||||
return keyHit1[chan];
|
||||
|
|
@ -143,10 +143,12 @@ void FurnaceGUI::drawChanOsc() {
|
|||
ImGui::Text(_("Columns"));
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
ImGui::BeginDisabled(chanOscAutoCols);
|
||||
if (ImGui::InputInt("##COSColumns",&chanOscCols,1,3)) {
|
||||
if (chanOscCols<1) chanOscCols=1;
|
||||
if (chanOscCols>64) chanOscCols=64;
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text(_("Size (ms)"));
|
||||
|
|
@ -160,18 +162,7 @@ void FurnaceGUI::drawChanOsc() {
|
|||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text(_("Automatic columns"));
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
const char* previewColType=autoColsTypes[chanOscAutoColsType&3];
|
||||
if (ImGui::BeginCombo("##AutoCols",previewColType)) {
|
||||
for (int j=0; j<4; j++) {
|
||||
const bool isSelected=(chanOscAutoColsType==j);
|
||||
if (ImGui::Selectable(autoColsTypes[j],isSelected)) chanOscAutoColsType=j;
|
||||
if (isSelected) ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
ImGui::Checkbox(_("Automatic columns"),&chanOscAutoCols);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
if (ImGui::Checkbox(_("Center waveform"),&chanOscWaveCorr)) {
|
||||
|
|
@ -423,7 +414,7 @@ void FurnaceGUI::drawChanOsc() {
|
|||
for (int i=0; i<chans; i++) {
|
||||
DivDispatchOscBuffer* buf=e->getOscBuffer(i);
|
||||
if (buf!=NULL && e->curSubSong->chanShowChanOsc[i]) {
|
||||
oscBufs.push_back(buf);
|
||||
oscBufs.push_back(buf); // isnt this odd how there are 3 vectors of the same size?
|
||||
oscFFTs.push_back(&chanOscChan[i]);
|
||||
oscChans.push_back(i);
|
||||
}
|
||||
|
|
@ -593,25 +584,11 @@ void FurnaceGUI::drawChanOsc() {
|
|||
}
|
||||
}
|
||||
chanOscWorkPool->wait();
|
||||
|
||||
// 0: none
|
||||
// 1: sqrt(chans)
|
||||
// 2: sqrt(chans+1)
|
||||
// 3: sqrt(chans)+1
|
||||
switch (chanOscAutoColsType) {
|
||||
case 1:
|
||||
chanOscCols=sqrt(oscChans.size());
|
||||
break;
|
||||
case 2:
|
||||
chanOscCols=sqrt(oscChans.size()+1);
|
||||
break;
|
||||
case 3:
|
||||
chanOscCols=sqrt(oscChans.size())+1;
|
||||
break;
|
||||
}
|
||||
if (chanOscCols<1) chanOscCols=1;
|
||||
if (chanOscCols>64) chanOscCols=64;
|
||||
|
||||
if (chanOscAutoCols) {
|
||||
chanOscCols=sqrt(oscBufs.size());
|
||||
if (chanOscCols>64) chanOscCols=64;
|
||||
}
|
||||
int rows=(oscBufs.size()+(chanOscCols-1))/chanOscCols;
|
||||
|
||||
// render
|
||||
|
|
|
|||
|
|
@ -8379,7 +8379,7 @@ void FurnaceGUI::syncState() {
|
|||
pianoLabelsMode=e->getConfInt("pianoLabelsMode",pianoLabelsMode);
|
||||
|
||||
chanOscCols=e->getConfInt("chanOscCols",3);
|
||||
chanOscAutoColsType=e->getConfInt("chanOscAutoColsType",0);
|
||||
chanOscAutoCols=e->getConfBool("chanOscAutoColsType",0);
|
||||
chanOscColorX=e->getConfInt("chanOscColorX",GUI_OSCREF_CENTER);
|
||||
chanOscColorY=e->getConfInt("chanOscColorY",GUI_OSCREF_CENTER);
|
||||
chanOscCenterStrat=e->getConfInt("chanOscCenterStrat",1);
|
||||
|
|
@ -8553,7 +8553,7 @@ void FurnaceGUI::commitState(DivConfig& conf) {
|
|||
|
||||
// commit per-chan osc state
|
||||
conf.set("chanOscCols",chanOscCols);
|
||||
conf.set("chanOscAutoColsType",chanOscAutoColsType);
|
||||
conf.set("chanOscAutoColsType",chanOscAutoCols);
|
||||
conf.set("chanOscColorX",chanOscColorX);
|
||||
conf.set("chanOscColorY",chanOscColorY);
|
||||
conf.set("chanOscCenterStrat",chanOscCenterStrat);
|
||||
|
|
@ -9187,7 +9187,6 @@ FurnaceGUI::FurnaceGUI():
|
|||
oscInput1(0.0f),
|
||||
oscZoomSlider(false),
|
||||
chanOscCols(3),
|
||||
chanOscAutoColsType(0),
|
||||
chanOscColorX(GUI_OSCREF_CENTER),
|
||||
chanOscColorY(GUI_OSCREF_CENTER),
|
||||
chanOscCenterStrat(1),
|
||||
|
|
@ -9203,6 +9202,7 @@ FurnaceGUI::FurnaceGUI():
|
|||
chanOscNormalize(false),
|
||||
chanOscRandomPhase(false),
|
||||
chanOscUseChanColor(false),
|
||||
chanOscAutoCols(false),
|
||||
chanOscTextFormat("%c"),
|
||||
chanOscColor(1.0f,1.0f,1.0f,1.0f),
|
||||
chanOscTextColor(1.0f,1.0f,1.0f,0.75f),
|
||||
|
|
|
|||
|
|
@ -2696,9 +2696,10 @@ class FurnaceGUI {
|
|||
bool oscZoomSlider;
|
||||
|
||||
// per-channel oscilloscope
|
||||
int chanOscCols, chanOscAutoColsType, chanOscColorX, chanOscColorY, chanOscCenterStrat;
|
||||
int chanOscCols, chanOscColorX, chanOscColorY, chanOscCenterStrat;
|
||||
float chanOscWindowSize, chanOscTextX, chanOscTextY, chanOscAmplify, chanOscLineSize;
|
||||
bool chanOscWaveCorr, chanOscOptions, updateChanOscGradTex, chanOscUseGrad, chanOscNormalize, chanOscRandomPhase, chanOscUseChanColor;
|
||||
bool chanOscWaveCorr, chanOscOptions, updateChanOscGradTex, chanOscUseGrad;
|
||||
bool chanOscNormalize, chanOscRandomPhase, chanOscUseChanColor, chanOscAutoCols;
|
||||
String chanOscTextFormat;
|
||||
ImVec4 chanOscColor, chanOscTextColor;
|
||||
Gradient2D chanOscGrad;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue