sm-26/Source/LcdDisplay.h
Armin bdd3b38cee Persist engine state in DAW projects, black monochrome panel, expand preset bank
- Save/load the engine's full parameter set alongside the preset index so
  knob and menu tweaks survive relaunching a song project
- Make the plugin panel black: top/surround laser border and bottom deck
  (rotary + nav keys) are now #000000
- Extend factory bank to 320 categorized presets and add LCD click-to-open
  preset category browser
2026-09-13 22:04:43 +02:00

35 lines
No EOL
819 B
C++

#pragma once
#include <JuceHeader.h>
class LcdDisplay : public juce::Component,
private juce::Timer
{
public:
static constexpr int kCols = 80;
static constexpr int kRows = 8;
LcdDisplay();
void setLine (int row, const juce::String& s);
void setInverted (int row, bool inverted);
void showCursor (bool show);
void clear();
void paint (juce::Graphics&) override;
void mouseDown (const juce::MouseEvent&) override;
std::function<void(int row)> onPressed;
private:
void timerCallback() override;
juce::String lines[kRows];
bool rowInverted[kRows];
int cursorCol = 0;
int cursorRow = 0;
bool cursorVisible = false;
const uint8_t* getGlyph (juce::uint32 c) const;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LcdDisplay)
};