mirror of
https://github.com/yokemura/Magical8bitPlug2.git
synced 2025-12-21 09:32:42 -05:00
Arpeggio parameters UI
This commit is contained in:
@ -27,27 +27,62 @@
|
||||
//[/MiscUserDefs]
|
||||
|
||||
//==============================================================================
|
||||
MonophonicComponent::MonophonicComponent ()
|
||||
MonophonicComponent::MonophonicComponent (Magical8bitPlug2AudioProcessor& p)
|
||||
{
|
||||
//[Constructor_pre] You can add your own custom stuff here..
|
||||
//[/Constructor_pre]
|
||||
|
||||
label.reset (new juce::Label ("label",
|
||||
TRANS("Monophonic Options")));
|
||||
addAndMakeVisible (label.get());
|
||||
label->setFont (juce::Font (17.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
|
||||
label->setJustificationType (juce::Justification::centredLeft);
|
||||
label->setEditable (false, false, false);
|
||||
label->setColour (juce::TextEditor::textColourId, juce::Colours::black);
|
||||
label->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000));
|
||||
|
||||
label->setBounds (0, 4, 150, 22);
|
||||
|
||||
behaviorChoice.reset (new ChoiceComponent (p, "monophonicBehavior", "Behavior"));
|
||||
addAndMakeVisible (behaviorChoice.get());
|
||||
behaviorChoice->setName ("behavior selector");
|
||||
|
||||
behaviorChoice->setBounds (0, 28, 224, 26);
|
||||
|
||||
intervalChoice.reset (new ChoiceComponent (p, "arpeggioIntervalType", "Interval"));
|
||||
addAndMakeVisible (intervalChoice.get());
|
||||
intervalChoice->setName ("interval selector");
|
||||
|
||||
intervalChoice->setBounds (228, 28, 185, 28);
|
||||
|
||||
intervalSlider.reset (new juce::Slider ("interval slider"));
|
||||
addAndMakeVisible (intervalSlider.get());
|
||||
intervalSlider->setRange (0, 10, 0.01);
|
||||
intervalSlider->setSliderStyle (juce::Slider::LinearHorizontal);
|
||||
intervalSlider->setTextBoxStyle (juce::Slider::TextBoxRight, false, 50, 20);
|
||||
|
||||
|
||||
//[UserPreSize]
|
||||
//[/UserPreSize]
|
||||
|
||||
setSize (640, 400);
|
||||
setSize (640, 82);
|
||||
|
||||
|
||||
//[Constructor] You can add your own custom stuff here..
|
||||
attc.reset (new SliderAttachment (p.parameters, "arpeggioIntervalSliderValue", *intervalSlider));
|
||||
//[/Constructor]
|
||||
}
|
||||
|
||||
MonophonicComponent::~MonophonicComponent()
|
||||
{
|
||||
//[Destructor_pre]. You can add your own custom destruction code here..
|
||||
attc.reset();
|
||||
//[/Destructor_pre]
|
||||
|
||||
label = nullptr;
|
||||
behaviorChoice = nullptr;
|
||||
intervalChoice = nullptr;
|
||||
intervalSlider = nullptr;
|
||||
|
||||
|
||||
//[Destructor]. You can add your own custom destruction code here..
|
||||
@ -60,8 +95,6 @@ void MonophonicComponent::paint (juce::Graphics& g)
|
||||
//[UserPrePaint] Add your own custom painting code here..
|
||||
//[/UserPrePaint]
|
||||
|
||||
g.fillAll (juce::Colour (0xff323e44));
|
||||
|
||||
//[UserPaint] Add your own custom painting code here..
|
||||
//[/UserPaint]
|
||||
}
|
||||
@ -71,6 +104,7 @@ void MonophonicComponent::resized()
|
||||
//[UserPreResize] Add your own custom resize code here..
|
||||
//[/UserPreResize]
|
||||
|
||||
intervalSlider->setBounds (getWidth() - (getWidth() - 420), 28, getWidth() - 420, 24);
|
||||
//[UserResized] Add your own custom resize handling here..
|
||||
//[/UserResized]
|
||||
}
|
||||
@ -91,10 +125,26 @@ void MonophonicComponent::resized()
|
||||
BEGIN_JUCER_METADATA
|
||||
|
||||
<JUCER_COMPONENT documentType="Component" className="MonophonicComponent" componentName=""
|
||||
parentClasses="public juce::Component" constructorParams="" variableInitialisers=""
|
||||
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
|
||||
fixedSize="0" initialWidth="640" initialHeight="400">
|
||||
<BACKGROUND backgroundColour="ff323e44"/>
|
||||
parentClasses="public juce::Component" constructorParams="Magical8bitPlug2AudioProcessor& p"
|
||||
variableInitialisers="" snapPixels="8" snapActive="1" snapShown="1"
|
||||
overlayOpacity="0.330" fixedSize="1" initialWidth="640" initialHeight="82">
|
||||
<BACKGROUND backgroundColour="ffffff"/>
|
||||
<LABEL name="label" id="bae3132bcad681ce" memberName="label" virtualName=""
|
||||
explicitFocusOrder="0" pos="0 4 150 22" edTextCol="ff000000"
|
||||
edBkgCol="0" labelText="Monophonic Options" editableSingleClick="0"
|
||||
editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
|
||||
fontsize="17.0" kerning="0.0" bold="0" italic="0" justification="33"/>
|
||||
<GENERICCOMPONENT name="behavior selector" id="fa2387d441a3005d" memberName="behaviorChoice"
|
||||
virtualName="" explicitFocusOrder="0" pos="0 28 224 26" class="ChoiceComponent"
|
||||
params="p, "monophonicBehavior", "Behavior""/>
|
||||
<GENERICCOMPONENT name="interval selector" id="21d73ddc37680dd7" memberName="intervalChoice"
|
||||
virtualName="" explicitFocusOrder="0" pos="228 28 185 28" class="ChoiceComponent"
|
||||
params="p, "arpeggioIntervalType", "Interval""/>
|
||||
<SLIDER name="interval slider" id="2d6901c46e73c1e" memberName="intervalSlider"
|
||||
virtualName="" explicitFocusOrder="0" pos="0Rr 28 420M 24" min="0.0"
|
||||
max="10.0" int="0.01" style="LinearHorizontal" textBoxPos="TextBoxRight"
|
||||
textBoxEditable="1" textBoxWidth="50" textBoxHeight="20" skewFactor="1.0"
|
||||
needsCallback="0"/>
|
||||
</JUCER_COMPONENT>
|
||||
|
||||
END_JUCER_METADATA
|
||||
|
||||
Reference in New Issue
Block a user