From e920b20fafe375eec15b24eb8cde4b1455dd01af Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 1 Nov 2026 20:11:41 +0100 Subject: v4.1.1: pointer-first betting and visible payouts in the GUI The felt snaps the hover to the shared fine lattice: inner half of a cell is a straight, an edge a split, a crossing a corner. A translucent chip previews the target and the covered cells tint. Left click adds the selected chip, right or middle click takes one back through the new Bets::reduce; C or CLEAR empties the slip, and SPIN stays disabled with no chips. The result now pays out: the wheel leaves the winning pocket under the pointer, the winning cell and pocket get a gold outline, and the sidebar reports the amount returned and the net for the round (NO WIN on a loss). Placing a chip after a result starts the next round without losing the wheel position. The column row now spans the full width like a real table instead of hugging the left edge. Adds tests for lattice snapping, target naming and taking chips back. --- docs/GUI-PLAN.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'docs/GUI-PLAN.md') diff --git a/docs/GUI-PLAN.md b/docs/GUI-PLAN.md index 8c3db0a..bb63530 100644 --- a/docs/GUI-PLAN.md +++ b/docs/GUI-PLAN.md @@ -79,11 +79,17 @@ crash board from its local clock. 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/roulette.rs` draws the felt, chips and wheel from a `RouletteView`; + it owns the geometry, not the rules. The felt is pointer-first: the hover + snaps to the fine lattice, so the inner half of a cell is a straight, an edge + is a split and a crossing is a corner. Left click adds the selected chip, + right or middle click takes one back, and a translucent chip previews the + target under the pointer. - `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. + 2.4 s wheel spin, highlights the winning pocket and cell, and reports the + amount paid and the net for the round. SPIN and CLEAR sit side by side so + clearing is never below the fold. - `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. -- cgit v1.2.3