mirror of
https://codeberg.org/armin/rmx-19.git
synced 2026-10-11 16:51:55 +02:00
Initial commit: RMX-19 rack sound module (VST3/AU) with dot-matrix LCD UI
This commit is contained in:
commit
c72c0216fd
16 changed files with 2170 additions and 0 deletions
53
Source/PluginEditor.h
Normal file
53
Source/PluginEditor.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
#pragma once
|
||||
#include <juce_gui_basics/juce_gui_basics.h>
|
||||
#include "LcdPanel.h"
|
||||
#include "PluginProcessor.h"
|
||||
|
||||
class RackEditor : public juce::AudioProcessorEditor, private juce::Timer
|
||||
{
|
||||
public:
|
||||
explicit RackEditor (RMX19AudioProcessor&);
|
||||
~RackEditor() override;
|
||||
|
||||
void paint (juce::Graphics&) override;
|
||||
void resized() override;
|
||||
|
||||
bool keyPressed (const juce::KeyPress&) override;
|
||||
|
||||
private:
|
||||
RMX19AudioProcessor& proc;
|
||||
|
||||
class NavButton : public juce::Button
|
||||
{
|
||||
public:
|
||||
NavButton (int d, const juce::String& glyph, const juce::String& label)
|
||||
: juce::Button (label), dir (d), mark (glyph)
|
||||
{ setWantsKeyboardFocus (true); setRepeatSpeed (320, 80); }
|
||||
void paintButton (juce::Graphics&, bool, bool) override;
|
||||
int dir;
|
||||
juce::String mark;
|
||||
};
|
||||
|
||||
class OkButton : public juce::Button
|
||||
{
|
||||
public:
|
||||
OkButton (const juce::String& label, bool isEnter)
|
||||
: juce::Button (label), enter (isEnter)
|
||||
{ setWantsKeyboardFocus (true); setRepeatSpeed (320, 80); }
|
||||
void paintButton (juce::Graphics&, bool, bool) override;
|
||||
bool enter;
|
||||
};
|
||||
|
||||
NavButton* up = nullptr; NavButton* down = nullptr;
|
||||
NavButton* left = nullptr; NavButton* right = nullptr;
|
||||
OkButton* enterB = nullptr; OkButton* backB = nullptr;
|
||||
|
||||
LcdPanel display;
|
||||
|
||||
juce::Colour face;
|
||||
float powerPulse = 0.0f;
|
||||
|
||||
void timerCallback() override;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RackEditor)
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue