gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

n2xPart.cpp (462B)


      1 #include "n2xPart.h"
      2 
      3 #include "n2xController.h"
      4 #include "n2xEditor.h"
      5 
      6 namespace n2xJucePlugin
      7 {
      8 	Part::Part(Editor& _editor, const std::string& _name, const ButtonStyle _buttonStyle) : PartButton(_editor, _name, _buttonStyle), m_editor(_editor)
      9 	{
     10 	}
     11 
     12 	void Part::onClick()
     13 	{
     14 		if(!m_editor.getN2xController().setCurrentPart(getPart()))
     15 		{
     16 			juce::MessageManager::callAsync([this]
     17 			{
     18 				setToggleState(true, juce::dontSendNotification);
     19 			});
     20 		}
     21 	}
     22 }