Theme picker and a theme that looks like MusicFrontend #42

Closed
opened 2026-10-09 16:06:00 +02:00 by Sansan · 0 comments
Owner

Add a second theme that looks like MusicFrontend, and a theme picker in Settings to switch between themes while the game runs. This issue also builds the picker that the Nord theme issue uses.

Feasibility

Yes.

  • Ready for themes. Every scene already takes all colours, fonts and style boxes from themes/main_theme.tres through named styles. tests/integration/test_theme.gd checks that no scene sets its own (see themes/README.md).
  • Switching at runtime. Set get_tree().root.theme = load(path). Controls without their own theme use the root window's theme before the project theme. Popups that are separate Windows (FileDialog) need their theme set too.

The MusicFrontend look

From MusicFrontend/src:

  • Colours:
    • orange accent #ff9c00;
    • dark grey panels rgb(66,66,66) and rgb(54,54,54);
    • black backgrounds;
    • light grey text rgb(185,185,185);
    • green #4CAF50 and red #f44336 for states.
  • Shapes: 10px rounded panels, 2–3px on small controls.
  • Font: Helvetica / sans-serif. Keep the bundled font so Japanese still works.

Go through the frontend's screens next to the game and match buttons, lists, the now-playing area and dialogs.

Plan

  • Theme file. themes/frontend_theme.tres, a copy of main_theme.tres with every named style kept and the colours and style boxes changed. Also Palette/backdrop and the ScoreGraph colours.
  • ThemeManager. A ThemeManager (autoload, or part of Settings) with:
    • a list of themes (name + path);
    • apply(theme_id), which sets get_tree().root.theme and remembers the choice;
    • a theme_changed signal for code that reads theme colours itself (ScoreGraph, PopupBackdrop), so they redraw.
  • Saving. Save the chosen theme in settings.cfg under [app] (SAVED_SETTINGS), and apply it at startup before the main window shows.
  • Picker. popups/SettingsPopup.tscn: a Theme OptionButton row. Picking a theme applies it at once, as a preview.
  • Tests.
    • test_theme.gd checks that every theme in the list has every named style that main_theme.tres has, so no theme misses a style.
    • Switching themes changes the root theme and is saved.
  • Docs. Update themes/README.md: how themes are listed and picked.

Question

  • Should the default stay the current theme, with "Frontend" as an option?
Add a second theme that looks like MusicFrontend, and a theme picker in Settings to switch between themes while the game runs. This issue also builds the picker that the Nord theme issue uses. ## Feasibility Yes. - **Ready for themes.** Every scene already takes all colours, fonts and style boxes from `themes/main_theme.tres` through named styles. `tests/integration/test_theme.gd` checks that no scene sets its own (see `themes/README.md`). - **Switching at runtime.** Set `get_tree().root.theme = load(path)`. Controls without their own theme use the root window's theme before the project theme. Popups that are separate `Window`s (FileDialog) need their theme set too. ## The MusicFrontend look From `MusicFrontend/src`: - **Colours:** - orange accent `#ff9c00`; - dark grey panels `rgb(66,66,66)` and `rgb(54,54,54)`; - black backgrounds; - light grey text `rgb(185,185,185)`; - green `#4CAF50` and red `#f44336` for states. - **Shapes:** 10px rounded panels, 2–3px on small controls. - **Font:** Helvetica / sans-serif. Keep the bundled font so Japanese still works. Go through the frontend's screens next to the game and match buttons, lists, the now-playing area and dialogs. ## Plan - **Theme file.** `themes/frontend_theme.tres`, a copy of `main_theme.tres` with every named style kept and the colours and style boxes changed. Also `Palette/backdrop` and the `ScoreGraph` colours. - **ThemeManager.** A `ThemeManager` (autoload, or part of `Settings`) with: - a list of themes (name + path); - `apply(theme_id)`, which sets `get_tree().root.theme` and remembers the choice; - a `theme_changed` signal for code that reads theme colours itself (`ScoreGraph`, `PopupBackdrop`), so they redraw. - **Saving.** Save the chosen theme in `settings.cfg` under `[app]` (`SAVED_SETTINGS`), and apply it at startup before the main window shows. - **Picker.** `popups/SettingsPopup.tscn`: a Theme `OptionButton` row. Picking a theme applies it at once, as a preview. - **Tests.** - `test_theme.gd` checks that every theme in the list has every named style that `main_theme.tres` has, so no theme misses a style. - Switching themes changes the root theme and is saved. - **Docs.** Update `themes/README.md`: how themes are listed and picked. ## Question - Should the default stay the current theme, with "Frontend" as an option?
Sansan added the feature label 2026-10-09 16:06:00 +02:00
Sign in to join this conversation.