mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
Reorder filter dropdown: list LP 48dB below LP 24dB
Keep the parameter choice indices stable (so saved projects, .cfl files and presets stay correct) and only reorder the displayed menu via explicit item IDs plus a new IndexedComboBoxAttachment, since the stock JUCE ComboBoxAttachment hard-maps choice index to menu position.
This commit is contained in:
parent
1a8928e8ce
commit
45d6082657
2 changed files with 59 additions and 3 deletions
|
|
@ -622,8 +622,20 @@ MainContentComponent::MainContentComponent(ChromaFlockProcessor& p)
|
|||
setupParam(phaseOffsetKnob, phaseOffsetAttach, "phaseOffset", "PHASE");
|
||||
|
||||
setupLabel(filterLabel, "FILTER");
|
||||
setupCB(filterTypeBox, filterTypeAttach, "filterType", {"LP 12dB", "LP 24dB", "Band Pass", "High Pass", "Notch",
|
||||
"Band Pass 24", "High Pass 24", "Notch 24", "LP 48dB"});
|
||||
// Display order differs from the parameter's index order: LP 48dB is shown
|
||||
// directly under LP 24dB. itemIds are (paramIndex + 1) so the underlying
|
||||
// choice index (and therefore saved state / presets) stays meaningful.
|
||||
setupCombo(filterTypeBox);
|
||||
filterTypeBox.addItem("LP 12dB", 1);
|
||||
filterTypeBox.addItem("LP 24dB", 2);
|
||||
filterTypeBox.addItem("LP 48dB", 9);
|
||||
filterTypeBox.addItem("Band Pass", 3);
|
||||
filterTypeBox.addItem("High Pass", 4);
|
||||
filterTypeBox.addItem("Notch", 5);
|
||||
filterTypeBox.addItem("Band Pass 24", 6);
|
||||
filterTypeBox.addItem("High Pass 24", 7);
|
||||
filterTypeBox.addItem("Notch 24", 8);
|
||||
filterTypeAttach = std::make_unique<IndexedComboBoxAttachment>(processorRef.apvts, "filterType", filterTypeBox);
|
||||
setupParam(filterCutoffKnob, filterCutoffAttach, "filterCutoff", "CUTOFF");
|
||||
setupParam(filterResKnob, filterResAttach, "filterRes", "RES");
|
||||
setupParam(filterEnvAmtKnob, filterEnvAmtAttach, "filterEnvAmt", "ENV AMT");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue