- Shared screen kit (mods/screen, docs/screens.md): a 1365x768 canvas centred in the render width on our own dark background, the game's frames and buttons; the main menu renders full width while it is shown. - The load window (cUI_Savegame) is replaced by the Spielen screen: character list, hero panel, campaign x difficulty grid, save/autosave choice, rename/delete/reset/new character dialogs. - Migrated characters without a shared hero load their hero's world first, then start the new world. - Options, Allgemein: autosave interval (Aus/5/10/15/30 minutes). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
40 lines
2.1 KiB
Markdown
40 lines
2.1 KiB
Markdown
# 16:9 menu screens
|
|
|
|
Request (2026-10-20): the game's menu screens are laid out for 1024x768; we
|
|
design our own UIs for them. There is no 16:9 artwork for the game, so the
|
|
background is our own (option 3 of the ones discussed: dark, no picture), and
|
|
the approach is shared by all menu screens. Target: 16:9, 1920x1080, which is
|
|
1365x768 in UI units; wider screens only get more background at the sides
|
|
(not designed for ultrawide).
|
|
|
|
## How a screen works
|
|
|
|
- `mods/screen.{h,cpp}`: a screen replaces a full-screen window's drawing and
|
|
mouse handling. Its render hook calls `screen::Render(window, device, body,
|
|
context)`: the background across the whole render target, then the body in
|
|
canvas coordinates (1365x768, centred: `hud::RenderCanvas`, the HUD
|
|
layer's offset machinery with `Anchor::Canvas`; drawing, the cursor and the
|
|
window's hit tests shifted alike). Mouse events go through `screen::Handle`
|
|
(`hud::HandleCanvas`). Keys stay the window's.
|
|
- In the main menu the game renders a classic 1024x768 frame (presented 4:3).
|
|
While a screen's window is shown, `widescreen::SetWideMenuScreen` makes the
|
|
menu thread render and present the full width.
|
|
- Parts: `screen::Panel` (dark backdrop and the game's frame, `cUI_Frame`,
|
|
game/ui/frame.h, made anew when its rect changes), `screen::Button` (a
|
|
button of the game's with the look of one of the window's,
|
|
`game::NewButtonLike`), `screen::Text`, `screen::Fill`,
|
|
`screen::DoubleClick`. Spacing constants from measurements: frames reach
|
|
0x20 beyond their rects and need a height of about 0x40, buttons reach 0x21.
|
|
Frames are built of 64-unit pieces: widths and heights in steps of 64
|
|
(`screen::kFrameStep`), other sizes leave gaps (screenshot 2026-10-20).
|
|
- Fonts (logged 2026-10-20): font 0 is another class (no line height field);
|
|
the TrueType fonts 1..7 have line heights 20, 19, 25, 31, 25, 28, 13.
|
|
Screens use font 1; 4 or 6 would suit headings.
|
|
- Inside the canvas scope the HUD layer does not stretch "full 1024 layout"
|
|
quads (`g_canvasScope`).
|
|
|
|
## Screens
|
|
|
|
- Spielen (the load window, cUI_Savegame): docs/characters.md, "Spielen
|
|
screen".
|