diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 917654a..9497fbb 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -39,9 +39,7 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor (Pa addAndMakeVisible(m_parcomps.back().get()); } } - addAndMakeVisible(&m_rec_enable); - m_rec_enable.setButtonText("Capture"); - attachCallback(m_rec_enable, [this]() { processor.setRecordingEnabled(m_rec_enable.getToggleState()); }); + //addAndMakeVisible(&m_specvis); setSize (1000, 30+(pars.size()/2)*25+200); m_wavecomponent.TimeSelectionChangedCallback = [this](Range range, int which) @@ -74,9 +72,8 @@ void PaulstretchpluginAudioProcessorEditor::resized() { m_import_button.setBounds(1, 1, 60, 24); m_import_button.changeWidthToFitText(); - m_rec_enable.setBounds(m_import_button.getRight()+1, 1, 10, 24); - m_rec_enable.changeWidthToFitText(); - m_info_label.setBounds(m_rec_enable.getRight() + 1, m_rec_enable.getY(), getWidth()-m_rec_enable.getRight()-1, 24); + + m_info_label.setBounds(m_import_button.getRight() + 1, m_import_button.getY(), getWidth()-m_import_button.getRight()-1, 24); for (int i = 0; i < m_parcomps.size(); ++i) { @@ -95,8 +92,6 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id) { for (auto& e : m_parcomps) e->updateComponent(); - if (processor.isRecordingEnabled() != m_rec_enable.getToggleState()) - m_rec_enable.setToggleState(processor.isRecordingEnabled(), dontSendNotification); if (processor.isRecordingEnabled()) { m_wavecomponent.setRecordingPosition(processor.getRecordingPositionPercent()); diff --git a/Source/PluginEditor.h b/Source/PluginEditor.h index aa22d28..eec21f3 100644 --- a/Source/PluginEditor.h +++ b/Source/PluginEditor.h @@ -274,12 +274,11 @@ private: PaulstretchpluginAudioProcessor& processor; std::vector> m_parcomps; SpectralVisualizer m_specvis; - ToggleButton m_rec_enable; + TextButton m_import_button; Label m_info_label; void chooseFile(); - JavascriptEngine m_js_engine; - MyDynamicObject m_js_object; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessorEditor) };