diff --git a/src-ui/app/edit-screen/components/LFOPane.cpp b/src-ui/app/edit-screen/components/LFOPane.cpp index 0cd27d2b..f65a7ef6 100644 --- a/src-ui/app/edit-screen/components/LFOPane.cpp +++ b/src-ui/app/edit-screen/components/LFOPane.cpp @@ -37,6 +37,7 @@ #include "sst/jucegui/components/GlyphPainter.h" #include "sst/jucegui/components/NamedPanel.h" #include "sst/jucegui/components/VSlider.h" +#include "sst/jucegui/components/DraggableTextEditableValue.h" // Included so we can have UI-thread exceution for curve rendering #include "modulation/modulators/steplfo.h" @@ -251,14 +252,19 @@ struct StepLFOPane : juce::Component, app::HasEditor makeLabel(L, A->getLabel()); }; + auto makeGlyph = [this](auto &c, sst::jucegui::components::GlyphPainter::GlyphType g) { + c = std::make_unique(g); + addAndMakeVisible(*c); + }; - ifac::attachAndAdd(ms, ms.stepLfoStorage.repeat, this, stepsA, stepsJ, parent->forZone, + ifac::attachAndAdd(ms, ms.stepLfoStorage.repeat, this, stepsA, stepsEd, parent->forZone, parent->selectedTab); connectors::addGuiStep(*stepsA, [w = juce::Component::SafePointer(this)](const auto &a) { if (w) w->stepRender->recalcCurve(); }); - stepsA->setJogWrapsAtEnd(false); + makeGlyph(stepsGlyph, sst::jucegui::components::GlyphPainter::STEP_COUNT); + // stepsA->setJogWrapsAtEnd(false); bfac::attachAndAdd(ms, ms.stepLfoStorage.rateIsForSingleStep, this, cycleA, cycleB, parent->forZone, parent->selectedTab); @@ -330,7 +336,8 @@ struct StepLFOPane : juce::Component, app::HasEditor std::unique_ptr rateL, deformL, phaseL; std::unique_ptr stepsA; - std::unique_ptr stepsJ; + std::unique_ptr stepsEd; + std::unique_ptr stepsGlyph; std::unique_ptr cycleA; std::unique_ptr cycleB; @@ -380,7 +387,10 @@ struct StepLFOPane : juce::Component, app::HasEditor // Knobs (END) // (use knobBounds to place this where the 4th knob would be) - stepsJ->setBounds(knobBounds.withHeight(buttonH)); + stepsEd->setBounds( + knobBounds.withHeight(buttonH).withTrimmedLeft(knobBounds.getWidth() / 2)); + stepsGlyph->setBounds( + knobBounds.withHeight(buttonH).withTrimmedRight(knobBounds.getWidth() / 2)); auto jogBox = knobBounds.withHeight(buttonH) .withY(knobBounds.getHeight() - buttonH) .withWidth(knobBounds.getWidth() / 2); diff --git a/src-ui/app/edit-screen/components/LFOPane.h b/src-ui/app/edit-screen/components/LFOPane.h index 48b7d2cf..0a9c8bb3 100644 --- a/src-ui/app/edit-screen/components/LFOPane.h +++ b/src-ui/app/edit-screen/components/LFOPane.h @@ -66,7 +66,7 @@ struct LfoPane : sst::jucegui::components::NamedPanel, app::HasEditor boolBaseAttachment_t; typedef connectors::BooleanPayloadDataAttachment boolAttachment_t; - typedef connectors::DiscretePayloadDataAttachment + typedef connectors::PayloadDataAttachment int16Attachment_t; LfoPane(SCXTEditor *, bool forZone);