Closes#38, #39 and #40; adds the client side of #41.
- Every request goes to /api/v1. MusicServerClient gets a token with
Settings.api_password the first time one is needed, reuses it, and on a
401 gets a new one and sends the request once more. Switching server gets
a new token too. Callers never see the token.
- Sync is started with POST, as MusicServer 5.0 requires.
- The client has every endpoint in the server's OpenAPI spec, including
statistics, soundtracks and songs by UUID, version, downloads and tokens.
- tools/generate_api_types.gd generates a typed class per schema in
server/openapi.json into server/generated/. Song info, statistics and
versions are passed to callers as these classes. A list the server sends
as null is an empty list.
- FakeHttpTransport hands out tokens and answers 401 without one, so every
test goes through the token flow. New tests cover the token handling,
every endpoint and each generated class.
themes/main_theme.tres is the project theme. It holds Godot's default look for
every control type the game uses, plus named styles for the game's own look
(popups, the background, spacers, list rows, title and text sizes, highlights)
and a palette for the popup dimming. Scenes and scripts name these styles
instead of setting colours, sizes or style boxes, and the five old theme files
are gone. themes/README.md explains the styles and how to make a new theme.
The screenshot tour now uses the real character pictures, so the layout
baseline is taken again. Screenshots are pixel-identical to before, and
test_theme.gd checks that the look stays in the theme.
main/ holds the main window and top bar, quiz/ the quiz and its parts,
player/ the music player, popups/ every popup and what they share, data/ the
songs, players, playlist and settings, server/ the MusicServer client,
common/ the list row and GameLog, and themes/ the themes and style boxes.