From 10ff558853f549d3f3c7c8432488bfad9da6973a Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 1 Nov 2026 19:58:59 +0100 Subject: v4.1.0: add the egui workspace member and the roulette style spike Phase 3 of the GUI plan. gui/ is a separate package that depends on the core with default features off, so egui never enters the TUI or server build graph. It carries the theme tokens and two embedded fonts (Open Sans OFL, Hack MIT), paints the felt, chips, cursor and wheel from RouletteView, and composes the persistent header with the betting sidebar. The reference screen runs on demo state: arrow keys move the shared Cursor, clicks place chips, and SPIN animates a 2.4 s wheel that settles with the winning pocket under the pointer. No network until Phase 4. Verified x86_64-pc-windows-gnu cross-compile. Measured on Linux at 1080p with llvmpipe: 6.0 MB binary (4.7 MB on Windows), 52 ms to window, 137 MB idle RSS, 0% idle CPU. --- docs/GUI-PLAN.md | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) (limited to 'docs/GUI-PLAN.md') diff --git a/docs/GUI-PLAN.md b/docs/GUI-PLAN.md index 2789b81..8c3db0a 100644 --- a/docs/GUI-PLAN.md +++ b/docs/GUI-PLAN.md @@ -69,15 +69,42 @@ crash board from its local clock. ## Phase 3 — `gui/` skeleton and the style spike -- Add the `gui/` workspace member (eframe), no game code yet. -- Theme module with the agreed tokens, two fonts, spacing scale. -- One reference screen: the roulette felt with chips, cursor, and a spinning - number, plus the persistent header (connection, balance, account). -- Verify the Windows cross-compile with a hello-world before going further. - -**Gate:** your approval of the screenshot at 1080p; binary ≤ 40 MB, idle -≤ 150 MB, cold start ≤ 1 s, 60 fps on integrated graphics. +**Code complete in v4.1.0; awaiting the screenshot sign-off.** + +- `gui/` is a workspace member (`zagan-bet-gui`). It depends on the core with + `default-features = false`, so neither egui nor native-tls enters the TUI or + server build graph. The build uses the workspace's `gui-release` profile + (opt-level `z`, LTO, stripped). +- `gui/src/theme.rs` holds the tokens: the terminal-derived dark palette, felt + green kept for the table, a 4/8/12/16/24 spacing scale, radii, and the type + scale. Two embedded fonts: Open Sans (OFL) for text, Hack (MIT) for numbers, + chips and labels. Licences sit next to the files in `gui/assets/fonts/`. +- `gui/src/roulette.rs` draws the felt, chips, the fine lattice cursor and the + wheel from a `RouletteView`; it owns the geometry, not the rules. +- `gui/src/app.rs` composes the persistent header (connection, account, + balance) with the table and the betting sidebar. The demo state animates a + 2.4 s wheel spin and highlights the winning pocket and cell. +- `gui/tests/layout.rs` covers the pure maths (money grouping, wheel angle, + table aspect, bet names). UI wiring tests arrive with `egui_kittest` in + Phase 4. + +Measured on Linux at 1080p with llvmpipe software GL: + +| Check | Result | +| --- | --- | +| Linux binary | 6.0 MB | +| Windows x86_64 binary | 4.7 MB | +| Cold start to window | 52 ms | +| Idle RSS | 137 MB | +| Idle CPU | 0% | + +The approved reference lives at `docs/screenshots/gui-roulette-1080p.png`, with +the result state at `docs/screenshots/gui-roulette-result-1080p.png`. + +**Gate:** the screenshot needs your approval. Frame rate on integrated graphics +still needs a run on real hardware. +## Phase 4 — GUI wiring ## Phase 4 — GUI wiring - Network thread with channels, request deadlines in the shared adapter. -- cgit v1.2.3