kopia lustrzana https://github.com/jameshball/osci-render
Increment version number
rodzic
6f73dd8940
commit
8f6a9f7ed8
Plik binarny nie jest wyświetlany.
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.45,17.45L1,12L6.45,6.55L7.86,7.96L4.83,11H19.17L16.14,7.96L17.55,6.55L23,12L17.55,17.45L16.14,16.04L19.17,13H4.83L7.86,16.04L6.45,17.45Z" /></svg>
|
Po Szerokość: | Wysokość: | Rozmiar: 218 B |
|
@ -2,7 +2,7 @@
|
|||
#include "PluginEditor.h"
|
||||
|
||||
LuaComponent::LuaComponent(OscirenderAudioProcessor& p, OscirenderAudioProcessorEditor& editor) : audioProcessor(p), pluginEditor(editor), slidersModel(sliders, p) {
|
||||
setText("Lua Settings");
|
||||
setText("Lua Sliders");
|
||||
|
||||
sliders.setModel(&slidersModel);
|
||||
sliders.setRowHeight(30);
|
||||
|
|
|
@ -6,6 +6,7 @@ EffectComponent::EffectComponent(OscirenderAudioProcessor& p, Effect& effect, in
|
|||
addChildComponent(lfoSlider);
|
||||
addAndMakeVisible(lfo);
|
||||
addAndMakeVisible(label);
|
||||
addAndMakeVisible(rangeButton);
|
||||
|
||||
sidechainEnabled = effect.parameters[0]->sidechain != nullptr;
|
||||
if (sidechainEnabled) {
|
||||
|
@ -33,6 +34,18 @@ EffectComponent::EffectComponent(OscirenderAudioProcessor& p, Effect& effect, in
|
|||
lfo.addItem("Reverse Sawtooth", static_cast<int>(LfoType::ReverseSawtooth));
|
||||
lfo.addItem("Noise", static_cast<int>(LfoType::Noise));
|
||||
|
||||
rangeButton.setTooltip("Click to change the range of the slider.");
|
||||
|
||||
rangeButton.onClick = [this] {
|
||||
juce::PopupMenu menu;
|
||||
|
||||
menu.addCustomItem(1, popupLabel, 200, 30, false);
|
||||
menu.addCustomItem(2, min, 160, 40, false);
|
||||
menu.addCustomItem(3, max, 160, 40, false);
|
||||
|
||||
menu.showMenuAsync(juce::PopupMenu::Options(), [this](int result) {});
|
||||
};
|
||||
|
||||
effect.addListener(index, this);
|
||||
setupComponent();
|
||||
}
|
||||
|
@ -42,6 +55,8 @@ EffectComponent::EffectComponent(OscirenderAudioProcessor& p, Effect& effect) :
|
|||
void EffectComponent::setupComponent() {
|
||||
EffectParameter* parameter = effect.parameters[index];
|
||||
|
||||
setEnabled(effect.enabled == nullptr || effect.enabled->getBoolValue());
|
||||
|
||||
setTooltip(parameter->description);
|
||||
label.setText(parameter->name, juce::dontSendNotification);
|
||||
label.setInterceptsMouseClicks(false, false);
|
||||
|
@ -109,7 +124,7 @@ void EffectComponent::setupComponent() {
|
|||
slider.setRange(effect.parameters[index]->min, effect.parameters[index]->max, effect.parameters[index]->step);
|
||||
};
|
||||
|
||||
popupLabel.setText(parameter->name + " Settings", juce::dontSendNotification);
|
||||
popupLabel.setText(parameter->name + " Range", juce::dontSendNotification);
|
||||
popupLabel.setJustificationType(juce::Justification::centred);
|
||||
popupLabel.setFont(juce::Font(14.0f, juce::Font::bold));
|
||||
|
||||
|
@ -147,12 +162,14 @@ void EffectComponent::resized() {
|
|||
sidechainButton->setBounds(bounds.removeFromRight(20));
|
||||
}
|
||||
|
||||
bool drawingSmall = bounds.getWidth() < 3 * TEXT_WIDTH;
|
||||
bool drawingSmall = bounds.getWidth() < 3.5 * TEXT_WIDTH;
|
||||
|
||||
if (lfoEnabled) {
|
||||
lfo.setBounds(bounds.removeFromRight(drawingSmall ? 70 : 100).reduced(5));
|
||||
lfo.setBounds(bounds.removeFromRight(drawingSmall ? 70 : 100).reduced(0, 5));
|
||||
}
|
||||
|
||||
rangeButton.setBounds(bounds.removeFromRight(20));
|
||||
|
||||
bounds.removeFromLeft(5);
|
||||
|
||||
label.setBounds(bounds.removeFromLeft(drawingSmall ? SMALL_TEXT_WIDTH : TEXT_WIDTH));
|
||||
|
@ -167,18 +184,6 @@ void EffectComponent::paint(juce::Graphics& g) {
|
|||
g.fillAll(findColour(effectComponentBackgroundColourId));
|
||||
}
|
||||
|
||||
void EffectComponent::mouseDown(const juce::MouseEvent& event) {
|
||||
if (event.mods.isPopupMenu()) {
|
||||
juce::PopupMenu menu;
|
||||
|
||||
menu.addCustomItem(1, popupLabel, 200, 30, false);
|
||||
menu.addCustomItem(2, min, 160, 40, false);
|
||||
menu.addCustomItem(3, max, 160, 40, false);
|
||||
|
||||
menu.showMenuAsync(juce::PopupMenu::Options(), [this](int result) {});
|
||||
}
|
||||
}
|
||||
|
||||
void EffectComponent::parameterValueChanged(int parameterIndex, float newValue) {
|
||||
triggerAsyncUpdate();
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ public:
|
|||
|
||||
void resized() override;
|
||||
void paint(juce::Graphics& g) override;
|
||||
void mouseDown(const juce::MouseEvent& event) override;
|
||||
void parameterValueChanged(int parameterIndex, float newValue) override;
|
||||
void parameterGestureChanged(int parameterIndex, bool gestureIsStarting) override;
|
||||
void handleAsyncUpdate() override;
|
||||
|
@ -47,5 +46,7 @@ private:
|
|||
LabelledTextBox min{"Min"};
|
||||
LabelledTextBox max{"Max"};
|
||||
|
||||
SvgButton rangeButton = { "rangeButton", BinaryData::range_svg, juce::Colours::white };
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(EffectComponent)
|
||||
};
|
||||
|
|
|
@ -20,6 +20,10 @@ LuaConsole::LuaConsole() {
|
|||
addAndMakeVisible(pauseConsoleButton);
|
||||
addAndMakeVisible(emptyConsoleLabel);
|
||||
|
||||
clearConsoleButton.setTooltip("Clear console output.");
|
||||
|
||||
pauseConsoleButton.setTooltip("Pause console output, and show a scrollbar to navigate through the console history.");
|
||||
|
||||
pauseConsoleButton.onClick = [this] {
|
||||
console.setScrollbarThickness(pauseConsoleButton.getToggleState() ? 10 : 0);
|
||||
};
|
||||
|
|
|
@ -5,8 +5,6 @@ class SvgButton : public juce::DrawableButton, public juce::AudioProcessorParame
|
|||
public:
|
||||
SvgButton(juce::String name, juce::String svg, juce::Colour colour, juce::Colour colourOn, BooleanParameter* toggle = nullptr) : juce::DrawableButton(name, juce::DrawableButton::ButtonStyle::ImageFitted), toggle(toggle) {
|
||||
auto doc = juce::XmlDocument::parse(svg);
|
||||
|
||||
setMouseCursor(juce::MouseCursor::PointingHandCursor);
|
||||
|
||||
changeSvgColour(doc.get(), colour);
|
||||
normalImage = juce::Drawable::createFromSVG(*doc);
|
||||
|
@ -56,6 +54,20 @@ class SvgButton : public juce::DrawableButton, public juce::AudioProcessorParame
|
|||
void handleAsyncUpdate() override {
|
||||
setToggleState(toggle->getBoolValue(), juce::NotificationType::dontSendNotification);
|
||||
}
|
||||
|
||||
void mouseEnter(const juce::MouseEvent& e) override {
|
||||
juce::DrawableButton::mouseEnter(e);
|
||||
|
||||
if (isEnabled()) {
|
||||
setMouseCursor(juce::MouseCursor::PointingHandCursor);
|
||||
}
|
||||
}
|
||||
|
||||
void mouseExit(const juce::MouseEvent& e) override {
|
||||
juce::DrawableButton::mouseExit(e);
|
||||
setMouseCursor(juce::MouseCursor::NormalCursor);
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<juce::Drawable> normalImage;
|
||||
std::unique_ptr<juce::Drawable> overImage;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
pluginCharacteristicsValue="pluginProducesMidiOut,pluginWantsMidiIn"
|
||||
pluginManufacturer="jameshball" aaxIdentifier="sh.ball.oscirender"
|
||||
cppLanguageStandard="20" projectLineFeed=" " headerPath="./include"
|
||||
version="2.1.1" companyName="James H Ball" companyWebsite="https://osci-render.com"
|
||||
version="2.1.2" companyName="James H Ball" companyWebsite="https://osci-render.com"
|
||||
companyEmail="james@ball.sh" defines="NOMINMAX=1">
|
||||
<MAINGROUP id="j5Ge2T" name="osci-render">
|
||||
<GROUP id="{5ABCED88-0059-A7AF-9596-DBF91DDB0292}" name="Resources">
|
||||
|
@ -26,6 +26,7 @@
|
|||
<FILE id="f2D5tv" name="pause.svg" compile="0" resource="1" file="Resources/svg/pause.svg"/>
|
||||
<FILE id="D2AI1b" name="pencil.svg" compile="0" resource="1" file="Resources/svg/pencil.svg"/>
|
||||
<FILE id="PFc2q2" name="random.svg" compile="0" resource="1" file="Resources/svg/random.svg"/>
|
||||
<FILE id="CE6di2" name="range.svg" compile="0" resource="1" file="Resources/svg/range.svg"/>
|
||||
<FILE id="n79IAy" name="record.svg" compile="0" resource="1" file="Resources/svg/record.svg"/>
|
||||
<FILE id="OaqZb1" name="right_arrow.svg" compile="0" resource="1" file="Resources/svg/right_arrow.svg"/>
|
||||
<FILE id="rXjNlx" name="threshold.svg" compile="0" resource="1" file="Resources/svg/threshold.svg"/>
|
||||
|
|
Ładowanie…
Reference in New Issue