kopia lustrzana https://github.com/jameshball/osci-render
21 wiersze
666 B
C++
21 wiersze
666 B
C++
#include "MidiComponent.h"
|
|
#include "PluginEditor.h"
|
|
|
|
MidiComponent::MidiComponent(OscirenderAudioProcessor& p, OscirenderAudioProcessorEditor& editor) : audioProcessor(p), pluginEditor(editor) {
|
|
addAndMakeVisible(midiToggle);
|
|
addAndMakeVisible(keyboard);
|
|
}
|
|
|
|
|
|
void MidiComponent::resized() {
|
|
auto area = getLocalBounds().reduced(5);
|
|
midiToggle.setBounds(area.removeFromTop(50));
|
|
keyboard.setBounds(area.removeFromBottom(100));
|
|
}
|
|
|
|
void MidiComponent::paint(juce::Graphics& g) {
|
|
auto rect = getLocalBounds().reduced(5);
|
|
g.setColour(getLookAndFeel().findColour(groupComponentBackgroundColourId));
|
|
g.fillRect(rect);
|
|
}
|