| 1 | #include "SliderContainer.h" |
| 2 | |
| 3 | SliderContainer::SliderContainer(std::shared_ptr<PluginParameters> valueTreeState, Colour textColour, int textBoxHeight) : |
| 4 | cutOffSlider(valueTreeState, textColour, textBoxHeight), |
| 5 | balanceSlider(valueTreeState, textColour, textBoxHeight), |
| 6 | tiltSlider(valueTreeState, textColour, textBoxHeight), |
| 7 | tiltToggle("Enable tilt") |
| 8 | { |
| 9 | this->pluginParameters = valueTreeState; |
| 10 | addAndMakeVisible(cutOffSlider); |
| 11 | addAndMakeVisible(balanceSlider); |
| 12 | |
| 13 | tiltToggle.setButtonText("Enable tilt"); |
| 14 | tiltToggle.setToggleState(false, NotificationType::dontSendNotification); |
| 15 | tiltToggle.setColour(ToggleButton::ColourIds::textColourId, textColour); |
| 16 | tiltToggle.setColour(ToggleButton::ColourIds::tickDisabledColourId, textColour); |
| 17 | tiltToggle.setColour(ToggleButton::ColourIds::tickColourId, textColour); |
| 18 | addAndMakeVisible(tiltToggle); |
| 19 | m_tiltButtonAttachment.reset(valueTreeState->createButtonAttachment(juce::String{ "enableTilt" }, tiltToggle)); |
| 20 | |
| 21 | addAndMakeVisible(tiltSlider); |
| 22 | } |
| 23 | |
| 24 | SliderContainer::~SliderContainer() { |
| 25 | m_tiltButtonAttachment = nullptr; |
nothing calls this directly
no test coverage detected