diff --git a/CMakeLists.txt b/CMakeLists.txt index ee0c173..fdd956e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,6 @@ juce_add_binary_data(ChromaFlockBinaryData NAMESPACE BinaryData SOURCES bg.png - cf3d.png newlogo.png ) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 8d6282c..e3a1564 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -130,7 +130,7 @@ void ComboBoxLookAndFeel::drawPopupMenuItem(juce::Graphics& g, const juce::Recta return; } - // Persistent highlight for the currently selected (ticked) entry + // Persistent highlight for the currently selected (ticked) entry or section if (isTicked && !isHighlighted) { g.setColour(juce::Colour(0xffccaa44).withAlpha(0.3f)); g.fillRoundedRectangle(area.reduced(2).toFloat(), 3.0f); @@ -660,9 +660,12 @@ void MainContentComponent::showPresetMenu() { auto categories = processorRef.presetManager.getCategories(); juce::String currentName; + juce::String currentCategory; auto& allPresets = processorRef.presetManager.getPresets(); - if (currentPresetIndex >= 0 && currentPresetIndex < static_cast(allPresets.size())) + if (currentPresetIndex >= 0 && currentPresetIndex < static_cast(allPresets.size())) { currentName = allPresets[currentPresetIndex].name; + currentCategory = allPresets[currentPresetIndex].category; + } for (auto& cat : categories) { juce::PopupMenu subMenu; @@ -672,7 +675,8 @@ void MainContentComponent::showPresetMenu() { bool isCurrent = (preset.name == currentName); subMenu.addItem(static_cast(menuOrder.size()), preset.name, true, isCurrent); } - menu.addSubMenu(cat, subMenu); + // Tick the section that contains the active patch (cleared when randomize -> index -1) + menu.addSubMenu(cat, subMenu, true, juce::Image(), cat == currentCategory); } menu.showMenuAsync(juce::PopupMenu::Options().withTargetComponent(&presetButton), @@ -959,19 +963,30 @@ void MainContentComponent::resized() { reverbDampKnob.setBounds(1468, fx2KnobY, lfoKnobSize, lfoKnobSize); reverbMixKnob.setBounds(1553, fx2KnobY, lfoKnobSize, lfoKnobSize); - // --- PRESET + SCALE --- - presetButton.setBounds(20, 8, 90, 28); - randomizeButton.setBounds(20, 42, 90, 28); - patchLCD.setBounds(118, 8, 360, 28); - prevPresetButton.setBounds(486, 8, 28, 28); - nextPresetButton.setBounds(518, 8, 28, 28); - octaveTransposeLabel.setBounds(1112, 10, 30, 20); - octaveTransposeBox.setBounds(1142, 8, 64, 24); - semitoneTransposeLabel.setBounds(1214, 10, 32, 20); - semitoneTransposeBox.setBounds(1246, 8, 74, 24); + // --- PRESET + SCALE (vertically centered within top section, y: 0..128) --- + int headerH = 128; + int btnH = 28, btnGap = 8; + int presetGroupH = btnH * 2 + btnGap; + int presetStartY = (headerH - presetGroupH) / 2; + presetButton.setBounds(20, presetStartY, 90, btnH); + randomizeButton.setBounds(20, presetStartY + btnH + btnGap, 90, btnH); - scaleLabel.setBounds(1520, 10, 42, 20); - uiScaleBox.setBounds(1566, 8, 80, 24); + int rowH = 28; + int rowY = (headerH - rowH) / 2; + patchLCD.setBounds(118, rowY, 360, rowH); + prevPresetButton.setBounds(486, rowY, 28, rowH); + nextPresetButton.setBounds(518, rowY, 28, rowH); + + int comboH2 = 24, labelH2 = 20; + int comboY2 = (headerH - comboH2) / 2; + int labelY2 = (headerH - labelH2) / 2; + octaveTransposeLabel.setBounds(1112, labelY2, 30, labelH2); + octaveTransposeBox.setBounds(1142, comboY2, 64, comboH2); + semitoneTransposeLabel.setBounds(1214, labelY2, 32, labelH2); + semitoneTransposeBox.setBounds(1246, comboY2, 74, comboH2); + + scaleLabel.setBounds(1520, labelY2, 42, labelH2); + uiScaleBox.setBounds(1566, comboY2, 80, comboH2); // Visualizer area int vizY = 818; diff --git a/Source/PresetManager.h b/Source/PresetManager.h index a01c3fd..45058ca 100644 --- a/Source/PresetManager.h +++ b/Source/PresetManager.h @@ -1605,7 +1605,7 @@ private: {"phaseOffset", 0.5f}, {"filterType", 0}, {"filterCutoff", 10000}, {"filterRes", 0.05f}, {"filterEnvAmt", 0.8f}, {"keyTrack", 0.95f}, {"fEnvAttack", 0.001f}, {"fEnvDecay", 0.06f}, {"fEnvSustain", 0.0f}, {"fEnvRelease", 0.04f}, - {"envAttack", 0.001f}, {"envDecay", 0.08f}, {"envSustain", 0.0f}, {"envRelease", 0.06f}, + {"envAttack", 0.001f}, {"envDecay", 2.5f}, {"envSustain", 0.0f}, {"envRelease", 0.2f}, {"pan", 0}, {"drive", 1.0f}, {"masterLevel", 0.8f}, {"pitchBendRange", 2}, {"distType", 0}, {"distAmount", 0}, {"distMix", 0}, diff --git a/cf.png b/cf.png deleted file mode 100644 index ead2a7c..0000000 Binary files a/cf.png and /dev/null differ diff --git a/cf3d.png b/cf3d.png deleted file mode 100644 index 4890838..0000000 Binary files a/cf3d.png and /dev/null differ diff --git a/logo.png b/logo.png deleted file mode 100644 index c32b928..0000000 Binary files a/logo.png and /dev/null differ diff --git a/shot.png b/shot.png deleted file mode 100644 index 2241c4f..0000000 Binary files a/shot.png and /dev/null differ