re-structure menu, darken UI

This commit is contained in:
Armin 2026-09-08 21:57:34 +02:00
commit 4b44841049
16 changed files with 1217 additions and 304 deletions

View file

@ -20,28 +20,39 @@ public:
static constexpr int gridW = 160; // dot-matrix cell resolution
static constexpr int gridH = 64;
// internal supersampling: dots are rasterized as anti-aliased circles at 4x,
// then box-downsampled 2:1 onto the 2px/dot presentation image. Downsampling
// turned off = chunky squares; 2x direct = boxy edges. 4x gives genuine round,
// separated dots that survive the (fractional) uiScale upscale.
static constexpr int subsample = 4;
static constexpr int presentScale = 2; // presentation pixels per logical dot
bool keyTrap (const juce::KeyPress&);
void mouseDown (const juce::MouseEvent&) override;
private:
enum class Screen { Splash, Home, Menu, Patch, Param, System, Info };
enum class Screen { Splash, Home, Menu, Patches, Patch, Param, System, Info, Category };
RMX19AudioProcessor& proc;
Screen screen = Screen::Splash;
juce::uint32 splashUntil = 0;
int cursor = 0; // menu / patch / param cursor
int patchCursor = 0;
int cursor = 0; // menu / param / system / catCursor (when in Category)
int patchCursor = 0; // patch cursor (global index)
int paramScreenIdx = 0; // which param screen is open
int catCursor = 0; // category browser cursor
std::vector<int> filteredPatches; // patch indices for current category filter
float powerGlow = 0.0f;
int lastVoices = -1;
juce::uint32 lastMidi = 0;
juce::Image dotImage; // 160x64 content scratch buffer
juce::Image displayImage; // 320x128 cached green-on-black result
juce::Image backdrop; // 320x128 static base (backlight + ghost dots)
juce::Image displayImage; // (gridW*subsample)x(gridH*subsample) render target: glass base + content dots
juce::Image presentImage; // (gridW*presentScale)x(gridH*presentScale) box-downsampled for the panel
juce::Image backdrop; // (gridW*subsample)x(gridH*subsample) static 3D glass base (backlight + sheen + vignette + ghost dots)
bool contentDirty = true;
static const juce::uint8* glyphFor (int key);
@ -49,6 +60,7 @@ private:
void rebuild();
void buildBackdrop();
juce::Rectangle<int> lcdImageRect() const;
void drawContent (juce::Graphics&);
void px (juce::Graphics&, int x, int y, float intensity);
@ -61,6 +73,8 @@ private:
void drawSplash (juce::Graphics&);
void drawHome (juce::Graphics&);
void drawMenu (juce::Graphics&);
void drawCategory (juce::Graphics&);
void drawPatches (juce::Graphics&);
void drawPatchList (juce::Graphics&);
void drawParamScreen (juce::Graphics&);
void drawSystem (juce::Graphics&);
@ -75,6 +89,9 @@ private:
void setDirty() { contentDirty = true; repaint(); }
void enterScreen (Screen s) { screen = s; cursor = 0; setDirty(); }
// open the category/patch browser, positioned on the loaded patch's category
void openPatchBrowser();
void timerCallback() override;
int rowCountForScreen() const;
@ -83,6 +100,9 @@ private:
void openParamScreen (int idx);
const char* paramScreenTitle (int idx) const;
int paramCountForScreen (int idx) const;
int patchCountForCurrentView() const;
int patchIndexAtCursor (int viewIdx) const;
void buildFilteredPatches (int catIdx);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LcdPanel)
};