-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6048c8
commit 20402e8
Showing
5 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "BrickwallChyron.h" | ||
#include "gui/Shared/Colours.h" | ||
|
||
namespace gui::brickwall | ||
{ | ||
BrickwallChyron::BrickwallChyron (chowdsp::PluginState& pluginState, | ||
dsp::brickwall::Params& params, | ||
const chowdsp::HostContextProvider& hcp) | ||
: state (pluginState), | ||
cutoffSlider (state, params.cutoff.get(), &hcp) | ||
{ | ||
cutoffSlider.setName ("Cutoff"); | ||
addAndMakeVisible (cutoffSlider); | ||
} | ||
|
||
void BrickwallChyron::resized() | ||
{ | ||
auto bounds = getLocalBounds(); | ||
cutoffSlider.setBounds (bounds.reduced (proportionOfHeight (0.2f))); | ||
} | ||
|
||
void BrickwallChyron::paint (juce::Graphics& g) | ||
{ | ||
const auto bounds = getLocalBounds(); | ||
|
||
g.setColour (juce::Colours::black.withAlpha (0.75f)); | ||
g.fillRoundedRectangle (bounds.toFloat(), 2.5f); | ||
|
||
g.setColour (colours::linesColour); | ||
g.drawRoundedRectangle (bounds.toFloat(), 2.5f, 1.0f); | ||
} | ||
} // namespace gui::brickwall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#pragma once | ||
|
||
#include "dsp/Brickwall/BrickwallProcessor.h" | ||
#include "gui/Shared/Fonts.h" | ||
#include "gui/Shared/TextSlider.h" | ||
|
||
namespace gui::brickwall | ||
{ | ||
class BrickwallChyron : public juce::Component | ||
{ | ||
public: | ||
BrickwallChyron (chowdsp::PluginState& pluginState, | ||
dsp::brickwall::Params& params, | ||
const chowdsp::HostContextProvider& hcp); | ||
|
||
void resized() override; | ||
void paint (juce::Graphics& g) override; | ||
|
||
private: | ||
chowdsp::PluginState& state; | ||
|
||
TextSlider cutoffSlider; | ||
|
||
SharedFonts fonts; | ||
|
||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BrickwallChyron) | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters