2024-08-10 19:26:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
#include "EffectComponent.h"
|
|
|
|
#include "SvgButton.h"
|
2024-08-13 13:55:30 +00:00
|
|
|
#include "../LookAndFeel.h"
|
|
|
|
#include "SwitchButton.h"
|
2024-08-10 19:26:56 +00:00
|
|
|
|
|
|
|
class VisualiserSettings : public juce::Component {
|
|
|
|
public:
|
2024-08-21 12:35:26 +00:00
|
|
|
VisualiserSettings(OscirenderAudioProcessor&);
|
2024-08-10 19:26:56 +00:00
|
|
|
~VisualiserSettings();
|
|
|
|
|
|
|
|
void resized() override;
|
2024-08-13 13:55:30 +00:00
|
|
|
juce::var getSettings();
|
2024-08-10 19:26:56 +00:00
|
|
|
private:
|
|
|
|
OscirenderAudioProcessor& audioProcessor;
|
|
|
|
|
2024-08-23 10:06:50 +00:00
|
|
|
EffectComponent brightness{audioProcessor, *audioProcessor.brightnessEffect};
|
2024-08-10 19:26:56 +00:00
|
|
|
EffectComponent intensity{audioProcessor, *audioProcessor.intensityEffect};
|
|
|
|
EffectComponent persistence{audioProcessor, *audioProcessor.persistenceEffect};
|
|
|
|
EffectComponent hue{audioProcessor, *audioProcessor.hueEffect};
|
2024-08-13 13:55:30 +00:00
|
|
|
|
2024-08-13 18:19:05 +00:00
|
|
|
jux::SwitchButton graticuleToggle{audioProcessor.graticuleEnabled};
|
|
|
|
jux::SwitchButton smudgeToggle{audioProcessor.smudgesEnabled};
|
2024-08-14 19:27:56 +00:00
|
|
|
jux::SwitchButton upsamplingToggle{audioProcessor.upsamplingEnabled};
|
2024-08-10 19:26:56 +00:00
|
|
|
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(VisualiserSettings)
|
|
|
|
};
|
2024-08-13 13:55:30 +00:00
|
|
|
|
|
|
|
class SettingsWindow : public juce::DocumentWindow {
|
|
|
|
public:
|
|
|
|
SettingsWindow(juce::String name) : juce::DocumentWindow(name, Colours::darker, juce::DocumentWindow::TitleBarButtons::closeButton) {}
|
|
|
|
|
|
|
|
void closeButtonPressed() override {
|
|
|
|
setVisible(false);
|
|
|
|
}
|
|
|
|
};
|