sine wave works now
This commit is contained in:
@@ -6,17 +6,50 @@
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include "BinaryData.h"
|
||||
#include "FilterButtonLook.h"
|
||||
#include "PluginProcessor.h"
|
||||
#include "juce_gui_basics/juce_gui_basics.h"
|
||||
#include "PluginEditor.h"
|
||||
|
||||
//==============================================================================
|
||||
CrushFXAudioProcessorEditor::CrushFXAudioProcessorEditor (CrushFXAudioProcessor& p)
|
||||
: AudioProcessorEditor (&p), audioProcessor (p)
|
||||
{
|
||||
// Make sure that before the constructor has finished, you've set the
|
||||
// editor's size to whatever you need it to be.
|
||||
//images
|
||||
bg = juce::ImageCache::getFromMemory(BinaryData::BG_png, BinaryData::BG_pngSize);
|
||||
setSize (696, 400);
|
||||
dialLookandFeel.setImage();
|
||||
filterButtonLookAndFeel.setImages();
|
||||
crushSliderLookAndFeel.setImages();
|
||||
|
||||
addAndMakeVisible(dial1);
|
||||
addAndMakeVisible(dial2);
|
||||
addAndMakeVisible(crushSlider);
|
||||
addAndMakeVisible(filterButton);
|
||||
addAndMakeVisible(crushView);
|
||||
|
||||
//styling
|
||||
dial1.setLookAndFeel(&dialLookandFeel);
|
||||
dial1.setSliderStyle(juce::Slider::SliderStyle::Rotary);
|
||||
dial1.setTextBoxStyle(juce::Slider::TextEntryBoxPosition::NoTextBox, true, 0, 0);
|
||||
|
||||
dial2.setLookAndFeel(&dialLookandFeel);
|
||||
dial2.setSliderStyle(juce::Slider::SliderStyle::Rotary);
|
||||
dial2.setTextBoxStyle(juce::Slider::TextEntryBoxPosition::NoTextBox, true, 0, 0);
|
||||
|
||||
crushSlider.setLookAndFeel(&crushSliderLookAndFeel);
|
||||
crushSlider.setRange(juce::Range(0.0, 1.0), 0.0);
|
||||
crushSlider.setSliderStyle(juce::Slider::SliderStyle::LinearHorizontal);
|
||||
crushSlider.setTextBoxStyle(juce::Slider::TextEntryBoxPosition::NoTextBox, true, 0, 0);
|
||||
|
||||
filterButton.setLookAndFeel(&filterButtonLookAndFeel);
|
||||
filterButton.setToggleable(true);
|
||||
filterButton.setClickingTogglesState(true);
|
||||
filterButton.setButtonText("");
|
||||
|
||||
//sizing
|
||||
setSize (812, 350);
|
||||
setResizable(false, false);
|
||||
}
|
||||
|
||||
CrushFXAudioProcessorEditor::~CrushFXAudioProcessorEditor()
|
||||
@@ -26,11 +59,14 @@ CrushFXAudioProcessorEditor::~CrushFXAudioProcessorEditor()
|
||||
//==============================================================================
|
||||
void CrushFXAudioProcessorEditor::paint (juce::Graphics& g)
|
||||
{
|
||||
g.drawImage(bg, getLocalBounds().toFloat());
|
||||
g.drawImageAt(bg, 0,0);
|
||||
}
|
||||
|
||||
void CrushFXAudioProcessorEditor::resized()
|
||||
{
|
||||
// This is generally where you'll want to lay out the positions of any
|
||||
// subcomponents in your editor..
|
||||
crushView.setBounds(408, 11, 393, 273);
|
||||
dial1.setBounds(269, 287, 55, 56);
|
||||
dial2.setBounds(331, 287, 55, 56);
|
||||
crushSlider.setBounds(578, 293, 205, 43);
|
||||
filterButton.setBounds(165, 300, 94, 29);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user