refactor: modal-gate helper + data-driven colormap table

Two extensibility easy-wins, both behavior-preserving:

- UiModalOpen() centralizes the "an overlay owns input" check that was
  copy-pasted as `!showFileBrowser && !showAbout` across 6 input gates.
  New overlays now update one place.
- Colormaps become a COLORMAPS[] table (name + function) indexed by enum.
  GetColormapColor and the sidebar both read it, so adding a colormap is
  one enum value + one Cmap* fn + one row — and the sidebar name can no
  longer drift from the enum (deleted the parallel colormapNames[] array).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 01:53:55 -07:00
parent c4d1d096ad
commit 7240cf8ecf
5 changed files with 86 additions and 48 deletions
+1
View File
@@ -11,6 +11,7 @@ float MeasureTextScaled(const char* text, float baseSize);
// --- Colormaps ---
void GenerateColormapTexture(void);
const char* ColormapName(ColormapType type);
// --- Spectrogram texture ---
// GenerateSpectrogramTexture recomputes the synchrosqueezed reassignment (use