mirror of
https://codeberg.org/armin/rmx-19.git
synced 2026-10-11 16:51:55 +02:00
restore last screen on reopen instead of always landing on home
This commit is contained in:
parent
d3bf0804e1
commit
cfe5bcca5f
2 changed files with 103 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ public:
|
|||
void resetToHome();
|
||||
|
||||
static bool firstRunEver();
|
||||
static juce::File uiStateFile();
|
||||
|
||||
static constexpr int gridW = 160; // dot-matrix cell resolution
|
||||
static constexpr int gridH = 64;
|
||||
|
|
@ -52,6 +53,13 @@ private:
|
|||
int lastVoices = -1;
|
||||
juce::uint32 lastMidi = 0;
|
||||
|
||||
// last-screen persistence: the panel reopens where the user left off
|
||||
juce::uint32 lastUiWrite = 0;
|
||||
bool uiDirty = false;
|
||||
|
||||
void rememberUiState();
|
||||
bool restoreUiState();
|
||||
|
||||
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)
|
||||
|
|
@ -89,7 +97,7 @@ private:
|
|||
void stepDelaySync (int dir);
|
||||
|
||||
void setDirty() { contentDirty = true; repaint(); }
|
||||
void enterScreen (Screen s) { screen = s; cursor = 0; setDirty(); }
|
||||
void enterScreen (Screen s) { screen = s; cursor = 0; uiDirty = true; setDirty(); }
|
||||
|
||||
// open the category/patch browser, positioned on the loaded patch's category
|
||||
void openPatchBrowser();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue